N = int(eval(input()))

S = eval(input())



print((''.join(chr((ord(c) - ord('A') + N) % 26 + ord('A')) for c in S)))

N = int(eval(input()))

S = eval(input())



bs = S.encode('us-ascii')

print((bytes((b - 65 + N) % 26 + 65 for b in bs).decode('us-ascii')))

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

N = int(eval(input()))
S = eval(input())
bs = S.encode("us-ascii")
print((bytes((b - 65 + N) % 26 + 65 for b in bs).decode("us-ascii")))

-print(("".join(chr((ord(c) - ord("A") + N) % 26 + ord("A")) for c in S))) +bs = S.encode("us-ascii") +print((bytes((b - 65 + N) % 26 + 65 for b in bs).decode("us-ascii")))