Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

BCC - Binary Coded Characters

A binary coding of a text, consisting of letters of the english alphabet, can be done in the following way. Every character is associated to an integer, beginning with "A"=0 to "Z"=25 in alphabetical order and continuing with "a"=26 to "z"=51, which has to be represented in binary form and - if necessary - filled up with leading zeros, if less than 6 bits were needed otherwise. Your task is to (de)code a line of readable text or binary code respectively.

Input

Input starts with a positive integer t (t<100) in a single line. Then follow t lines, every line containing either a readable text (with less than 80 characters) or a binary coded string (with less than 500 digits). A readable text will only consist of letters of the english alphabet and single whitespaces to separate words, which shouldn't be converted to binary code. A binary coded string will only consist of ones and zeros as well as single whitespaces to separate coded words.

Output

For every testcase (de)code the respective line either to binary code or to readable text and print the result.

Example

Input:
2
010010011110011110 011000101000101110
Make it short

Output:
See You
001100011010100100011110 100010101101 101100100001101000101011101101

Added by:numerix
Date:2011-03-21
Time limit:9.239s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi
Resource:own problem

hide comments
2013-12-15 15:02:53 Piotr KÄ…kol
Done.
2013-12-15 04:20:41 Hallvard Norheim Bø
This challenge also needs rejudge for Python solutions.
2012-08-21 17:05:19 Hallvard Norheim Bø
The problem still persists. Python 2.7 version fail with NZEC, and Python 2.5 only version passes.
2012-08-21 14:11:52 Piotr KÄ…kol
@hallvabo - Try again and let me know if the problem still exists.
2012-08-13 18:06:00 Hallvard Norheim Bø
@numerix: that would explain my recent submission results. Hopefully this gets fixed soon.
2012-08-13 08:54:31 numerix
@hallvabo: There is some trouble with Python recently. Actually there seem to be Python 2.5 and Python 2.7 installed, but they are all labeled as 2.7. The "real" Python 2.7 installation seems to be broken at the moment ...
2012-08-12 21:06:56 Hallvard Norheim Bø
Piotr: why does the Python 2.7 version fail and the 2.5 version pass?
2012-07-19 04:30:08 Hallvard Norheim Bø
Why does #7339728 fail with NZEC? Works perfectly on ideone.com and locally.

edit: suddenly it just worked?!

Last edit: 2012-07-19 04:46:54
2011-03-30 19:53:57 numerix
As I didn't intend to submit a solution to my own problem, I didn't spend any time in shortening and only developed the code to produce input and output data.
2011-03-30 09:23:50 Hallvard Norheim Bø
@numerix: what's the size of your best Python solution?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.