n = int(eval(input()))

s = list(eval(input()))



list = []

for i in range(len(s)):

  eng = ord(s[i]) + n

  if eng > 90:

    eng = eng - 26

  eng2 = chr(eng)

  list += eng2



l = ''.join(list)

print(l)
n = int(eval(input()))

s = eval(input())



list = []

for i in range(len(s)):

  asc = ord(s[i])+n

  if asc > 90:

    asc = asc-26

  

  list.append(chr(asc))

  

print((''.join(list)))
n = int(eval(input()))
s = list(eval(input()))
list = []
for i in range(len(s)):
    eng = ord(s[i]) + n
    if eng > 90:
        eng = eng - 26
    eng2 = chr(eng)
    list += eng2
l = "".join(list)
print(l)

n = int(eval(input()))
s = eval(input())
list = []
for i in range(len(s)):
    asc = ord(s[i]) + n
    if asc > 90:
        asc = asc - 26
    list.append(chr(asc))
print(("".join(list)))

-s = list(eval(input())) +s = eval(input()) -    eng = ord(s[i]) + n -    if eng > 90: -        eng = eng - 26 -    eng2 = chr(eng) -    list += eng2 -l = "".join(list) -print(l) +    asc = ord(s[i]) + n +    if asc > 90: +        asc = asc - 26 +    list.append(chr(asc)) +print(("".join(list)))