N = int(eval(input()))

S = eval(input())



alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]



newS = ""

for x in S:

  newS += alphabet[(alphabet.index(x)+N)%26]

print(newS)
N = int(eval(input()))

S = eval(input())



alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"



newS = S.translate(str.maketrans(alphabet, alphabet[N:]+alphabet[:N]))

print(newS)
N = int(eval(input()))
S = eval(input())
alphabet = [
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
]
newS = ""
for x in S:
    newS += alphabet[(alphabet.index(x) + N) % 26]
print(newS)

N = int(eval(input()))
S = eval(input())
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
newS = S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N]))
print(newS)

-alphabet = [ -    "A", -    "B", -    "C", -    "D", -    "E", -    "F", -    "G", -    "H", -    "I", -    "J", -    "K", -    "L", -    "M", -    "N", -    "O", -    "P", -    "Q", -    "R", -    "S", -    "T", -    "U", -    "V", -    "W", -    "X", -    "Y", -    "Z", -] -newS = "" -for x in S: -    newS += alphabet[(alphabet.index(x) + N) % 26] +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +newS = S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N]))