n = int(input())

s = input()



for i in range(len(s)):

	num = int(ord(s[i])+n)

	if num > 90:

		num -= 26

	print(chr(num),end="")



n = int(eval(input()))

s = eval(input())



ans = ""

for i in range(len(s)):

	num = ord(s[i])+n

	if num > 90:

		num -= 26



	ans += chr(num)



print(ans)

n = int(input())
s = input()
for i in range(len(s)):
    num = int(ord(s[i]) + n)
    if num > 90:
        num -= 26
    print(chr(num), end="")

n = int(eval(input()))
s = eval(input())
ans = ""
for i in range(len(s)):
    num = ord(s[i]) + n
    if num > 90:
        num -= 26
    ans += chr(num)
print(ans)

-n = int(input()) -s = input() +n = int(eval(input())) +s = eval(input()) +ans = "" -    num = int(ord(s[i]) + n) +    num = ord(s[i]) + n -    print(chr(num), end="") +    ans += chr(num) +print(ans)