n = int(input())

s = input()

for i in range(len(s)):

  print(chr(((ord(s[i])+n)%91)%65+65), end = "")

n = int(eval(input()))

s = eval(input())

alph = ""

for i in range(26):

  alph += chr(65+i)

print((s.translate(str.maketrans(alph, alph[n:] + alph[:n]))))
n = int(input())
s = input()
for i in range(len(s)):
    print(chr(((ord(s[i]) + n) % 91) % 65 + 65), end="")

n = int(eval(input()))
s = eval(input())
alph = ""
for i in range(26):
    alph += chr(65 + i)
print((s.translate(str.maketrans(alph, alph[n:] + alph[:n]))))

-n = int(input()) -s = input() -for i in range(len(s)): -    print(chr(((ord(s[i]) + n) % 91) % 65 + 65), end="") +n = int(eval(input())) +s = eval(input()) +alph = "" +for i in range(26): +    alph += chr(65 + i) +print((s.translate(str.maketrans(alph, alph[n:] + alph[:n]))))