mojiretu = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

output = ""

index = 0

N = int(eval(input()))

S = eval(input())



for j in S:

  count = 0

  for i in mojiretu:

    if i == j:

      output = output + (mojiretu[count + N]) 

      break

    count = count + 1  

  index = index + 1



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

s = eval(input())

ans = ""

for i in s:

    s_asc = ord(i)

    dum = s_asc + n

    if dum > ord("Z"):

        dum = dum - 26

    ans = ans + chr(dum)

print(ans)
mojiretu = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
output = ""
index = 0
N = int(eval(input()))
S = eval(input())
for j in S:
    count = 0
    for i in mojiretu:
        if i == j:
            output = output + (mojiretu[count + N])
            break
        count = count + 1
    index = index + 1
print(output)

n = int(eval(input()))
s = eval(input())
ans = ""
for i in s:
    s_asc = ord(i)
    dum = s_asc + n
    if dum > ord("Z"):
        dum = dum - 26
    ans = ans + chr(dum)
print(ans)

-mojiretu = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" -output = "" -index = 0 -N = int(eval(input())) -S = eval(input()) -for j in S: -    count = 0 -    for i in mojiretu: -        if i == j: -            output = output + (mojiretu[count + N]) -            break -        count = count + 1 -    index = index + 1 -print(output) +n = int(eval(input())) +s = eval(input()) +ans = "" +for i in s: +    s_asc = ord(i) +    dum = s_asc + n +    if dum > ord("Z"): +        dum = dum - 26 +    ans = ans + chr(dum) +print(ans)