N = int(eval(input()))

S = eval(input())



s=[]

for i in range(len(S)):

  if ord(S[i])+N >= 91:

    j = (ord(S[i])+N -65)%26+65

    s.append(chr(j))

  else:

    s.append(chr(ord(S[i])+N))

print((''.join(s)))
n = int(eval(input()))

S = eval(input())



ol = [(ord(s)+n-65)%26+65 for s in S]

st = [chr(o) for o in ol]

print((''.join(st)))
N = int(eval(input()))
S = eval(input())
s = []
for i in range(len(S)):
    if ord(S[i]) + N >= 91:
        j = (ord(S[i]) + N - 65) % 26 + 65
        s.append(chr(j))
    else:
        s.append(chr(ord(S[i]) + N))
print(("".join(s)))

n = int(eval(input()))
S = eval(input())
ol = [(ord(s) + n - 65) % 26 + 65 for s in S]
st = [chr(o) for o in ol]
print(("".join(st)))

-N = int(eval(input())) +n = int(eval(input())) -s = [] -for i in range(len(S)): -    if ord(S[i]) + N >= 91: -        j = (ord(S[i]) + N - 65) % 26 + 65 -        s.append(chr(j)) -    else: -        s.append(chr(ord(S[i]) + N)) -print(("".join(s))) +ol = [(ord(s) + n - 65) % 26 + 65 for s in S] +st = [chr(o) for o in ol] +print(("".join(st)))