Efficiently decoding strings from their shingles