n = int(eval(input()))

s = list(eval(input()))



a = []



for i in range(len(s)):

  b =  ord(s[i])

  b -= 65

  b += n

  b = b % 26

  b += 65

  b = chr(b)

  a.append(b)



  

a= ''.join(a)

  

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

s = list(eval(input()))

a = []

for i in range(len(s)):

  b =  chr((ord(s[i]) -65 + n) % 26 + 65)

 

  a.append(b)

a= ''.join(a)

print(a)
n = int(eval(input()))
s = list(eval(input()))
a = []
for i in range(len(s)):
    b = ord(s[i])
    b -= 65
    b += n
    b = b % 26
    b += 65
    b = chr(b)
    a.append(b)
a = "".join(a)
print(a)

n = int(eval(input()))
s = list(eval(input()))
a = []
for i in range(len(s)):
    b = chr((ord(s[i]) - 65 + n) % 26 + 65)
    a.append(b)
a = "".join(a)
print(a)

-    b = ord(s[i]) -    b -= 65 -    b += n -    b = b % 26 -    b += 65 -    b = chr(b) +    b = chr((ord(s[i]) - 65 + n) % 26 + 65)