N = int(input())

S = input()

alfa = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

lis = []

for s in S:

    for i in range(26):

        if s == alfa[i]:

            lis.append((i+N)%26)

            break

for i in range(len(S)):

    print(alfa[lis[i]],end = '')

N = int(input())

S = input()

for i in range(len(S)):

    a = ord(S[i])+N

    if a > ord('Z'):

        a -= 26

    print(chr(a),end ='')

N = int(input())
S = input()
alfa = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lis = []
for s in S:
    for i in range(26):
        if s == alfa[i]:
            lis.append((i + N) % 26)
            break
for i in range(len(S)):
    print(alfa[lis[i]], end="")

N = int(input())
S = input()
for i in range(len(S)):
    a = ord(S[i]) + N
    if a > ord("Z"):
        a -= 26
    print(chr(a), end="")

-alfa = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -lis = [] -for s in S: -    for i in range(26): -        if s == alfa[i]: -            lis.append((i + N) % 26) -            break -    print(alfa[lis[i]], end="") +    a = ord(S[i]) + N +    if a > ord("Z"): +        a -= 26 +    print(chr(a), end="")