arb='ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = int(eval(input()))

S = eval(input())

ans =''

for i in range(len(S)):

    if arb.index(S[i]) + N +1 <= len(arb):

        ans += arb[arb.index(S[i])+N]

    else:

        ans += arb[-len(arb) + arb.index(S[i]) + N]

print(ans)
N = int(eval(input()))

S = eval(input())



ans = ''

for i in S:

    if ord(i) + N <= 90:

        ans += chr(ord(i)+N)

    else:

        ans += chr(-90 + ord(i) +N +64)



print(ans)

arb = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N = int(eval(input()))
S = eval(input())
ans = ""
for i in range(len(S)):
    if arb.index(S[i]) + N + 1 <= len(arb):
        ans += arb[arb.index(S[i]) + N]
    else:
        ans += arb[-len(arb) + arb.index(S[i]) + N]
print(ans)

N = int(eval(input()))
S = eval(input())
ans = ""
for i in S:
    if ord(i) + N <= 90:
        ans += chr(ord(i) + N)
    else:
        ans += chr(-90 + ord(i) + N + 64)
print(ans)

-arb = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -for i in range(len(S)): -    if arb.index(S[i]) + N + 1 <= len(arb): -        ans += arb[arb.index(S[i]) + N] +for i in S: +    if ord(i) + N <= 90: +        ans += chr(ord(i) + N) -        ans += arb[-len(arb) + arb.index(S[i]) + N] +        ans += chr(-90 + ord(i) + N + 64)