29 2 s 128 MB
A cryptoquote is a simple encoded message where one letter is simply replaced by another throughout the message. For example:
Encoded: HPC PJVYMIY
Decoded: ACM CONTEST
In the example above, H=A, P=C, C=M, J=O, V=N, Y=T, M=E and I=S. For this problem, you will decode messages.
The first line of input contains a single integer N
For each data set, you should generate one line of output with the following values: The data set number as a decimal integer (start counting at one), a space and the decoded message.
2 HPC PJVYMIY BLMRGJIASOPZEFDCKWYHUNXQTV FDY GAI BG UKMY KIMHOTSQYRLCUZPAGWJNBVDXEF
1 ACM CONTEST 2 THE SKY IS BLUE