N = int(eval(input()))

S = list(eval(input()))



lst = [chr(ord('a') + i) for i in range(26)]

lst_up = list(map(str.upper,lst))



for i in range(len(S)):

    if int(lst_up.index(S[i])+N+1) <= len(lst_up):

        S[i] = lst_up[lst_up.index(S[i])+N]

    elif  int(lst_up.index(S[i])+N+1) > len(lst_up):

        S[i] = lst_up[lst_up.index(S[i])+N-26]



lst_2 = "".join(S)

print(lst_2)
n = int(eval(input()))

s = list(eval(input()))

lst_26 = [(chr(ord("a") + i)).upper() for i in range(26)]



for i in range(len(s)):

    if lst_26.index(s[i])+n >= 26:

        s[i] = lst_26[lst_26.index(s[i])+n-26]

    else:

        s[i] = lst_26[lst_26.index(s[i])+n]

print(("".join(s)))
N = int(eval(input()))
S = list(eval(input()))
lst = [chr(ord("a") + i) for i in range(26)]
lst_up = list(map(str.upper, lst))
for i in range(len(S)):
    if int(lst_up.index(S[i]) + N + 1) <= len(lst_up):
        S[i] = lst_up[lst_up.index(S[i]) + N]
    elif int(lst_up.index(S[i]) + N + 1) > len(lst_up):
        S[i] = lst_up[lst_up.index(S[i]) + N - 26]
lst_2 = "".join(S)
print(lst_2)

n = int(eval(input()))
s = list(eval(input()))
lst_26 = [(chr(ord("a") + i)).upper() for i in range(26)]
for i in range(len(s)):
    if lst_26.index(s[i]) + n >= 26:
        s[i] = lst_26[lst_26.index(s[i]) + n - 26]
    else:
        s[i] = lst_26[lst_26.index(s[i]) + n]
print(("".join(s)))

-N = int(eval(input())) -S = list(eval(input())) -lst = [chr(ord("a") + i) for i in range(26)] -lst_up = list(map(str.upper, lst)) -for i in range(len(S)): -    if int(lst_up.index(S[i]) + N + 1) <= len(lst_up): -        S[i] = lst_up[lst_up.index(S[i]) + N] -    elif int(lst_up.index(S[i]) + N + 1) > len(lst_up): -        S[i] = lst_up[lst_up.index(S[i]) + N - 26] -lst_2 = "".join(S) -print(lst_2) +n = int(eval(input())) +s = list(eval(input())) +lst_26 = [(chr(ord("a") + i)).upper() for i in range(26)] +for i in range(len(s)): +    if lst_26.index(s[i]) + n >= 26: +        s[i] = lst_26[lst_26.index(s[i]) + n - 26] +    else: +        s[i] = lst_26[lst_26.index(s[i]) + n] +print(("".join(s)))