N=int(eval(input()))

S=eval(input())

print(("".join(chr(65+(ord(s)-65+N)%26) for s in S)))
N=int(eval(input()))

S=eval(input())

print((bytes((s-65+N)%26+65 for s in S.encode()).decode()))
N = int(eval(input()))
S = eval(input())
print(("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S)))

N = int(eval(input()))
S = eval(input())
print((bytes((s - 65 + N) % 26 + 65 for s in S.encode()).decode()))

-print(("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))) +print((bytes((s - 65 + N) % 26 + 65 for s in S.encode()).decode()))