시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 4 4 4 100.000%

문제

You want to keep some secrets, so you invent a simple encryption algorithm.

You will map each uppercase character and underscore to some other uppercase character and underscore. In other words, this is a permutation of the characters, or, to put it another way, you create a 1:1 and onto map from {’A’, ’B’, ...., ’Z’, ’ ’} to {’A’, ’B’, ...., ’Z’, ’ ’}.

However, you will repeatedly apply this encryption in an attempt to make your message more secure.

입력

The input will be 29 lines long. The first 27 lines will each contain a single character from the set {’A’, ’B’, ...., ’Z’, ’ ’}. The first of these lines represents what the character ’A’ maps to, the second of these lines represents what the character ’B’ maps to, and so on, until the 27th line represents what the underscore character maps to.

On the 28th line will be an integer N (1 ≤ N ≤ 2, 000, 000, 000) which represents the number of times this encryption should be applied.

On the 29th line is T, a string of less than 80 characters from the set {’A’, ’B’, ...., ’Z’, ’ ’}.

출력

On one line, output the string created after shuffling T a total of N times, using the given shuffle permuation.

예제 입력 1

B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
_
A
3
I_LOVE_THE_CCC

예제 출력 1

LCORYHCWKHCFFF