Encoding scheme :
a = 1, b = 2, c = 3, ..... , z = 26, ' ' = 32 ( space )
Encryption of word "she" = 1985. As s = 19, h = 8, e = 5.
But decryption of 1985 may give us:
she ( s = 19, h = 8, e = 5 )
aihe ( a = 1, i = 9, h = 8, e = 5 )
Given an encrypted string, find the hidden message.
A string is a message if all the words it contains are valid in dictionary.
The message will only contain words ( small case ) and spaces.
Your dictionary can be formed by the text below.
The text comprises of small case characters, space and fullstop.
betty botter bought a bit of butter.
the butter betty botter bought was a bit bitter
and made her batter bitter.
but a bit of better butter makes better batter.
so betty botter bought a bit of better butter
making betty botters bitter batter better.
if two witches were watching two watches. which witch would watch which watch.
peter piper picked a peck of pickled peppers.
if peter piper picked a peck of pickled peppers.
wheres the peck of pickled peppers peter piper picked.
how many cans can a canner can. if my canner can can cans.
a canner can can as many cans as a canner can. if a canner can can cans.
of all the felt i ever felt.
i never felt a piece of felt
which felt as fine as that felt felt
when first i felt that felt had felt.
First Line contains denoting number of test cases.
Next t lines contains encrypted message.
Every Test cases print the correct line.
Only one possible solution will be there of given test cases.
Length of each input string <= 80
peter was watching a witch
a butter never felt so bitter
Problem Setter : Sunny Lalwani