n = int(eval(input()))

S = eval(input())

ans = ''

for s in S:

    if ord(s) + n <= 90:

        ans += chr(ord(s) + n)

    else:

        ans += chr(65 + ord(s) + n - 90 - 1)

print(ans)

n = int(eval(input()))

S = eval(input())

a = ord('A')

z = ord('Z')

ans = ''

for s in S:

    if ord(s) + n <= 90:

        ans += chr(ord(s) + n)

    else:

        ans += chr(a + ord(s) + n - z - 1)

print(ans)

n = int(eval(input()))
S = eval(input())
ans = ""
for s in S:
    if ord(s) + n <= 90:
        ans += chr(ord(s) + n)
    else:
        ans += chr(65 + ord(s) + n - 90 - 1)
print(ans)

n = int(eval(input()))
S = eval(input())
a = ord("A")
z = ord("Z")
ans = ""
for s in S:
    if ord(s) + n <= 90:
        ans += chr(ord(s) + n)
    else:
        ans += chr(a + ord(s) + n - z - 1)
print(ans)

+a = ord("A") +z = ord("Z") -        ans += chr(65 + ord(s) + n - 90 - 1) +        ans += chr(a + ord(s) + n - z - 1)