Recently, Masha and Katya have learned that there is evil in the world of hackers, which can easily reveal the strange correspondence. So they decided to send only encrypted messages. For this purpose, friends began to use the permutation code, where each letter is replaced by another. For example:
Encoded message: HPC PJVYMIY
Decode the message: ACM CONTEST
In this example, the following replacement: H = A, P = C, C = M, J = O, V = N, Y = T, M = E and I = S.
In order not to engage in hand-coding and decoding, a friend asked you to write the program. Help girls!
In the first line of input is written coded message. Second line - 26 Latin uppercase letters representing the code for the corresponding symbol alphabet: the first character gives the code for A, B for second and so on. To be used only uppercase letters. In an encoded message may appear gaps that must be stored in the output string.
In the output file display one line, which contains the decoded message.
HPC PJVYMIY BLMRGJIASOPZEFDCKWYHUNXQTV