n=int(eval(input()))

s=eval(input())

t=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2)

a=""

for i in s:a+=t[t.index(i)+n]

print(a)
t="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

n=int(eval(input()))

print(("".join([t[t.index(i)+n]for i in eval(input())])))
n = int(eval(input()))
s = eval(input())
t = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2)
a = ""
for i in s:
    a += t[t.index(i) + n]
print(a)

t = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(eval(input()))
print(("".join([t[t.index(i) + n] for i in eval(input())])))

+t = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" -s = eval(input()) -t = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2) -a = "" -for i in s: -    a += t[t.index(i) + n] -print(a) +print(("".join([t[t.index(i) + n] for i in eval(input())])))