alps = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

n = int(eval(input()))

s = eval(input())



ans = ''

for i in range(len(s)):

    idx = alps.index(s[i])

    idx += n

    if 25 < idx:

        idx = idx - 26

    x = alps[idx]

    ans += x

print(ans)

  
alps = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

n = int(eval(input()))

s = eval(input())



ans = ''

for i in range(len(s)):

    idx = (alps.index(s[i]) + n)%26

    ans += alps[idx]

print(ans)
alps = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(eval(input()))
s = eval(input())
ans = ""
for i in range(len(s)):
    idx = alps.index(s[i])
    idx += n
    if 25 < idx:
        idx = idx - 26
    x = alps[idx]
    ans += x
print(ans)

alps = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(eval(input()))
s = eval(input())
ans = ""
for i in range(len(s)):
    idx = (alps.index(s[i]) + n) % 26
    ans += alps[idx]
print(ans)

-    idx = alps.index(s[i]) -    idx += n -    if 25 < idx: -        idx = idx - 26 -    x = alps[idx] -    ans += x +    idx = (alps.index(s[i]) + n) % 26 +    ans += alps[idx]