All Submissions


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.



Input
First Line contains denoting number of test cases.
Next t lines contains encrypted message.

Output
Every Test cases print the correct line.
Only one possible solution will be there of given test cases.

Constraints
T<=10
Length of each input string <= 80

Sample Input

2
1652051832231193223120389147321322392038
132221202051832145225183265122032191532292020518


Sample Output

peter was watching a witch
a butter never felt so bitter


Problem Setter : Sunny Lalwani


Languages: Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 3.5 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0