CAOS (Computer Aid for Office Security) is developing an encoding system to protect text files. The
designed encoding is based on a character translation map, defined by a set of pairs
{(a1,b1), (a2,b2), ..., (aM,bM)}
where aj, bj are characters of the English alphabet , 1≤j≤M. The encoding of a given text is the
same text where each aj is replaced by the corresponding bj. The replacements should be carried
simultaneously.
CAOS asked you to write a program to accomplish text encoding as explained. Your program
receives a character translation map and a text to be translated.
INPUT
Input consists of N test cases (1≤N≤10). The number N is given in the first line of the input file.
OUTPUT
For each analyzed case one output line. Cases must be answered in the same order that were
presented. The output line of a test case is the corresponding encoded text.
SAMPLE INPUT
2
mesdynr
diressn
send more money
abcd
baca
abracadabra barba