Synapse Crypt Secrets
In the carnival of Synapse there are very important messages that need to be passed between the various clowns. These messages are very important as they contain the acts which they are going to perform so they encode it using Synoquote a techniquie the devised so no rival carnival can read them.
A Synoquote is a simple encoded message where one letter is simply replaced by another
throughout the message.
Encoded: FDY GAI BG UKMY
Decoded: THE SKY IS BLUE
But being clowns they are very confused on how to decode these messages so kindly help them.
The first line of input contains a single integer N, (0 < N <1001) which is the number of test cases that
follow. Each testcase consists of two lines of input. The first line is the encoded message. The
second line is a 26 character string of upper case letters giving the character mapping for each letter
of the alphabet: the first character gives the mapping for A, the second for B and so on. Only upper
case letters will be used. Spaces may appear in the encoded message, and should be preserved in
the output string.
For each testcase, 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.
Input: FDY GAI BG UKMY KIMHOTSQYRLCUZPAGWJNBVDXEF Output: THE SKY IS BLUE
|Time Limit:||0.1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions