N = int(eval(input()))

Ss = eval(input())



ordA = ord('A')



ans = ''

for S in Ss:

    i = ord(S) - ordA

    i = (i+N) % 26

    ans += chr(ordA + i)



print(ans)

ordA = ord('A')



N = int(eval(input()))

Ss = input().rstrip()



anss = ''

for S in Ss:

    S = ord(S) - ordA

    anss += chr(ordA + (S+N)%26)



print(anss)

N = int(eval(input()))
Ss = eval(input())
ordA = ord("A")
ans = ""
for S in Ss:
    i = ord(S) - ordA
    i = (i + N) % 26
    ans += chr(ordA + i)
print(ans)

ordA = ord("A")
N = int(eval(input()))
Ss = input().rstrip()
anss = ""
for S in Ss:
    S = ord(S) - ordA
    anss += chr(ordA + (S + N) % 26)
print(anss)

+ordA = ord("A") -Ss = eval(input()) -ordA = ord("A") -ans = "" +Ss = input().rstrip() +anss = "" -    i = ord(S) - ordA -    i = (i + N) % 26 -    ans += chr(ordA + i) -print(ans) +    S = ord(S) - ordA +    anss += chr(ordA + (S + N) % 26) +print(anss)