URI Online Judge | 2338

Morse

By Syed Sarfaraz Akhtar, IIITH IN India

Timelimit: 1

All your friends are crazy about the movie "Interstellar". They are now posting on facebook in Morse code. You need to write a code to decode Morse!!

These Morse codes only contain lowercase english letters(a-z) and whitespaces.

Note - Morse code is a way to encode characters as a sequence of dits and dashes. Each character has a fixed encoding. An example of a famous morse code is that of SOS "...---..." . S is encoded as "..." (dit dit dit) and O is encoded as "---" (dash dash dash).
In this problem, a dit is denoted by "=" and a dash is denoted by "===". Symbols are seperated by "." , letters are seperated by "..." and words are seperated by "......." .
So, SOS is encoded as =.=.=...===.===.===...=.=.=
Encodings for all the characters can be found at the link given below.

Input

There are multiple test cases.

The first line of the input contains the number of test cases (t)(1 <= t <= 10).

The next t lines contain morse codes. The length of each code is less than 1000 characters

Output

Output the decoded codes in a new line for each test case.

Input Sample Output Sample

2

===.===.=...===.===.=
=.=.=...===.===.===...=.=.=

gg

sos