Problem:
 Score : 200 points    Problem Statement We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that A follows Z . For example, shifting A by 2 results in C ( A  \to  B  \to  C ), and shifting Y by 3 results in B ( Y  \to  Z  \to  A  \to  B ).      Constraints  0 \leq N \leq 26  1 \leq |S| \leq 10^4  S consists of uppercase English letters.         Input Input is given from Standard Input in the following format:  N  S       Output Print the string resulting from shifting each character of S by N in alphabetical order.        Sample Input 1 2
ABCXYZ      Sample Output 1 CDEZAB  Note that A follows Z .       Sample Input 2 0
ABCXYZ      Sample Output 2 ABCXYZ       Sample Input 3 13
ABCDEFGHIJKLMNOPQRSTUVWXYZ      Sample Output 3 NOPQRSTUVWXYZABCDEFGHIJKLM

Solution (Python):
N = int(input())
S = input()

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in list(S):
    print(alpha[(alpha.index(i) + N) % len(alpha)], end='')
print()

Solution (Python):
import string
import numpy as np
N = int(input())
S = list(input())
A2Z = string.ascii_uppercase

str_index = np.full(len(S), 0)
mod_26 = np.full(len(S), 26)


for i in range(len(S)):
    str_index[i] = A2Z.index(S[i])
str_index = (str_index+N) % mod_26


tmp = ['']*len(S)
for i in range(len(S)):
    index = int(str_index[i])
    tmp[i] = A2Z[index]
answer = ''.join(tmp)
print(answer)

Solution (Python):
N = int(input())
S = input()
for i in range(len(S)):
  print(chr(65+(ord(S[i])-65+N)%26),end="")

print("")

Solution (Python):
n=int(input())
s=list(input())
l=len(s)
ans=""
a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in s:
    idx=a.index(i)
    t_idx=(idx+n) % 26
    ans += a[t_idx]
print(ans)

Solution (Python):
n=int(input())
s=input()
def f(x,n):
  return chr(ord(x)+n) if ord(x)+n <= ord('Z') else chr(ord(x)+n-26)
S=f(s[0],n)
for i in range(len(s)-1):
  S=S+f(s[i+1],n)
print(S)

Solution (Python):
n=int(input())
s=list(map(str,input()))
for i in range(len(s)):
    if ord(s[i])+n>=91:
        s[i]=chr(ord(s[i])+n-90+64)
    else:
        s[i]=chr(ord(s[i])+n)
print(''.join(s))

Solution (Python):
n = int(input())
s = input()

list = []
for i in range(len(s)):
  asc = ord(s[i])+n
  if asc > 90:
    asc = asc-26
  
  list.append(chr(asc))
  
print(''.join(list))

Solution (Python):
n = int(input())
s = list(input())
for i in range(len(s)):
    x = ord(s[i]) + n
    if x > ord('Z'):
        x = x - 26
    s[i] = chr(x)
print (''.join(s))

Solution (Python):
n=int(input())
s=list(input())
r=[]
for x in s:
    c=ord(x)+n
    if c>90:c=c-26
    r.append(chr(c))
print("".join(r))

Solution (Python):
n = int(input())

ans = []
for s in input():
    i = ord(s) + n
    if i > 90:
        i -= 26
    ans.append(chr(i))

print(''.join(ans))

Solution (Python):
n = int(input())
s = [ord(v) for v in input()]

ans = []
for i in s:
    i += n
    if i > 90:
        i -= 26
    ans.append(chr(i))

print(''.join(ans))

Solution (Python):
n = int(input())
s = [ord(v) for v in input()]

ans = ''
for i in s:
    i += n
    if i > 90:
        i -= 26
    ans += chr(i)

print(ans)

Solution (Python):
n = int(input())
s = input()

ans = []

for i in range(len(s)):
  temp = ord(s[i]) + n
  if temp >= 91:
    temp = temp - 91 + 65
  ans.append(chr(temp))

print(''.join(ans))

Solution (Python):
Alpha = ["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"]

N = int(input())

line = list(input())

for i in range(len(line)):
    line[i] = Alpha[(Alpha.index(line[i]) + N) % 26]
    
print("".join(line))

Solution (Python):
n=int(input())
s=input()
for i in range(len(s)):
    tmp=(ord(s[i])-ord('A')+n)%26+ord('A')
    print(chr(tmp),end="")

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
L=input()[:-1]
F=[]
for i in range(len(L)):
    A=ord(L[i])+n
    if A>=91:
        A=A-91+65
    F.append(chr(A))
print("".join(F))

Solution (Python):
n=int(input())
L=input()
F=[]
for i in range(len(L)):
    A=ord(L[i])+n
    if A>=91:
        A=A-91+65
    F.append(chr(A))
print("".join(F))

Solution (Python):
N = int(input())
S = input()
f=lambda x:chr(ord("A")+(ord(x)-ord("A")+N)%26)
print("".join(map(f, S)))

Solution (Python):
num = int(input())
text = input()
movedText = ""
for i in text:
  if ord(i) + num > ord("z") or ord(i) + num > ord("Z"):
    movedText += chr(ord(i) - 26 + num)
    continue
  movedText += chr(ord(i) + num)
print(movedText)

Solution (Python):
N = int(input())
S = input()
list1 = ['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']
dic = {}
for i in range(26):
  dic[list1[i]] = (i + N) % 26

c = ''
for s in S:
  af_s = list1[dic[s]]
  c += af_s

print(c)

Solution (Python):
al_list = [chr(ord('A') + i) for i in range(26)]

n = int(input())
s = input()
r = ""
for i in range(len(s)):
    r += al_list[(al_list.index(s[i]) + n) % 26]

print(r)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    s = input().strip()
    
    for c in s:
        i = ord(c) + N
        
        if i > ord("Z"):
            i -= ord("Z") - ord("A") + 1
        print(chr(i), end="")
    print()

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
s = input()
lenlen = len(s)
 
a = ''
for i in range(lenlen):
    c = ord(s[i]) + n
    if 91 <= c:
        c = c - 26
    a = a + chr(c)
print(a)

Solution (Python):
N = int(input())
S = input()
a = ""
b = []

List = ["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"]

for i in range(len(S)):
    a = S[i]
    c = List.index(a)
    c = c + N
    if 25 < c:
        c = c - 26
    b.append(List[c])

for i in range(len(b)):
    print(b[i], end ='')

Solution (Python):
N, S = int(input()), input()
fun = lambda n, c: chr(((ord(c)-ord('A')+n)%(ord('Z')-ord('A')+1))+ord('A'))
print(''.join([fun(N, c) for c in list(S)]))

Solution (Python):
N = int(input())
S = input()




T=""
for i in range(len(S)):
    a = ord(S[i])
    if (a+N) > 90:
        b = a+N - 90
        b = b % 26
        if b==0:
            s = "Z"
        else:
            c = 64+b
            s = chr(c)
        T = T + s
    else:
        a = a+N
        s = chr(a)
        T = T + s
print(T)

Solution (Python):
N = int(input())
S = list(input())
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i,s in enumerate(S):
    S[i] = alpha[(alpha.index(s) + N) % 26]
print("".join(S))

Solution (Python):
def rot(n, s):
    result = ""
    for i in s:
        result += chr(ord("A") + (ord(i) - ord("A") + n) % 26)
    return result

if __name__ == "__main__":
    n = int(input())
    s = input()
    print(rot(n, s))

Solution (Python):
n=int(input())
s=input()
a=''
for i in range(0,len(s)):
    v=ord(s[i])
    if v+n<=ord('Z'):
        a+=chr(v+n)
    else:
        a+=chr(v+n-26)
print(a)

Solution (Python):
import sys
row = sys.stdin.readline


def read_int(row):
    return int(row().rstrip())

def read_string(row):
    return row().rstrip()

N = read_int(row)
S = read_string(row)

print("".join([chr((ord(i) + N - 26 if ord(i) + N > 90 else ord(i) + N)) for i in S]))

Solution (Python):
N = int(input())
S = input()
newS = ''
for char in S:
    if ord(char)+N >= 91:
        newS += chr(ord(char)-26 + N)
    else:
        newS += chr(ord(char)+N)
print(newS)

Solution (Python):
import string

def main():
    n_a = dict(enumerate(string.ascii_uppercase))
    a_n = {v:k for k,v in n_a.items()}

    n = int(input())
    s = "".join(n_a[(a_n[c]+n)%26] for c in input())

    print(s)
if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
s = input()
lenlen = len(s)

a = ''
for i in range(lenlen):
    c = ord(s[i]) + n
    if 91 <= c:
        c = c - 26
    a = a + chr(c)
print(a)

Solution (Python):
n=int(input())
s=str(input())

result=""

for i in s:
    result += chr(ord("A")+(ord(i)-ord("A")+n)%26)
    
print(result)

Solution (Python):
N=int(input())
S=input()
for i in S:
    print(chr(65+(ord(i)-65+N)%26),end="")

Solution (Python):
n = int(input())
s = list(input())
l = len(s)
for i in range(l):
    a = ord(s[i]) + n
    if a > 90:
        a = a - 26
    s[i] = chr(a)

m = ''.join(s)
print(m)

Solution (Python):
n=int(input())
s = list(input())
for l in s:
  m = ((ord(l)-65)+n)%26+65
  j = chr(m)
  print(j,end="",sep="")

Solution (Python):

n=int(input())
s=input()
ans=""
for x in s:
    num=(ord(x)+n)
    if num>90:
        num=64+num%90
    ans+=chr(num)
print(ans)

Solution (Python):
N = int(input())
S = list(input())

for i in range(len(S)):
    S[i] = chr(((ord(S[i]) - 65) + N)%26 + 65)

print(''.join(S))

Solution (Python):
N = int(input())
S = input()

list_str = ['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']

ans = ''
for s in S:
  _ = list_str.index(s)
  next_index = _ + N
  if next_index >= 26:
    next_index =  next_index - 26
  ans += list_str[next_index]

print(ans)

Solution (Python):
n = int(input())
s = input()

for i in s:
  if ord(i) + n > 90:
    print(chr(ord(i) + n - 91 + 65), end='')
  else:
    print(chr(ord(i) + n), end='')

Solution (Python):


MOD = 10 ** 9 + 7

N = int(input())
S = input()

strs = ['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']

ans = []
for s in S:
    ans.append(strs[(strs.index(s)+N) % 26])

print(''.join(ans))

Solution (Python):


n = int(input())
s = input()
ans = []

for i in range(len(s)):
    ans.append(chr((ord(s[i])+n-ord('A'))%26 + ord('A')))
print("".join(ans))

Solution (Python):
N = int(input())
S = input()
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans =""
for i in range(len(S)):
    for j in range(len(alp)):
        if S[i] == alp[j]:
            if j+N >= 26:
                ans += alp[j+N-26]
            else:
                ans += alp[j+N]
print(ans)

Solution (Python):
N = int(input())
S = input()

for i in list(S):
    if ord(i) + N > 90:
        print(chr(ord(i) + N - 26), end='')
    else:
        print(chr(ord(i) + N), end='')

Solution (Python):
n = int(input())
s = input()

res =""

offset = ord("A")
for ch in s:
    if ord(ch) + n >= offset + 26:
        res += chr((ord(ch) + n) - 26)
    else:
        res += chr((ord(ch) + n))
print(res)

Solution (Python):

n = int(input())
s = input()
A = ord("A")
B = ord("Z")
l = []




for i in range(len(s)):
    if ord(s[i])+n <= B:
        l.append(chr(ord(s[i])+n))
    else:
        l.append(chr(ord(s[i])+n-26))

print("".join(l))

Solution (Python):
n,s=int(input()),input()
ans=""
for ss in s:
  if ord(ss)+n > 90:
    ans+=chr(ord(ss)+n-26)
  else:
  	ans+=chr(ord(ss)+n)
    
print(ans)

Solution (Python):
N = int(input())
S = input()
l = ['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']

ss = ""
for i in range(len(S)):
    s = S[i]
    num = l.index(s)
    ss += l[(num + N) % len(l)]

print(str.upper(ss))

Solution (Python):
n = int(input())
s = input()
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for si in s:
    index = alphabet.find(si)
    print(alphabet[(index + n) % 26], sep='', end='')

Solution (Python):
N=int(input())
l=input()
for i in range(len(l)):
    print(chr((ord(l[i])+N-65)%26+65),end="")

Solution (Python):
N=int(input())
S=list(input())
AL =[chr(i) for i in range(65, 65+26)]
for i in range(len(S)):
    S[i] = AL[(AL.index(S[i]) + N)%26]

print("".join(S))

Solution (Python):
N=int(input())
S=input()
ans=''
for s in S:
    if ord(s)+N>90:
        ans+=chr(ord(s)+N-26)
    else:
        ans+=chr(ord(s)+N)
print(ans)

Solution (Python):
import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop
import itertools



readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(input())
A = list(input())


for i in range(len(A)):
    a = ord(A[i])
    a += N
    
    while(a > 90):
        a -= 26

    A[i] = chr(a)

print(''.join(A))

Solution (Python):
N = int(input())
S = list(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"]
new_S = []
for i in range(len(S)):
  s = alphabet.index(S[i])+N
  if s >= 26 :
    s -= 26
  new_S.append(alphabet[s])
print("".join(new_S))

Solution (Python):
n=int(input())
s=input()
alf="ABCDEFGHIJKLMNOPQRSTUVWXYZ "
li=[]
for i in range(len(s)):
  li.append(alf[(alf.index(s[i])+n)%26])
for i in range(len(li)):
  print(li[i], end="")

Solution (Python):
N = int(input())
S = input()

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in range(len(S)):
    idx = alpha.index(S[i])
    ans += alpha[(idx + N) % 26]
print(ans)

Solution (Python):
alph = ['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']

N = int(input())
S = input()

new = ""
for s in S:
    idx = alph.index(s)
    new += alph[N - (len(alph) - idx)]
print(new)

Solution (Python):
import string

n = int(input())
s = input()

alpha = string.ascii_uppercase
ans = ""

for i in range(len(s)):
    new_ind = (alpha.index(s[i]) + n) % 26
    ans += alpha[new_ind]

print(ans)

Solution (Python):
N = int(input())
S = input()

ANS = ""

for MOJI in S:
  i = ord(MOJI) + N
  if i > 90:
    i = i - 26
  ANS = ANS + chr(i)

print(ANS)

Solution (Python):


D = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
S = list(input())

for i in range(len(S)):
    S[i] = D[(D.index(S[i]) + n) % 26]

print("".join(S))

Solution (Python):
N=int(input())
S=input()
st=""
for i in range(len(S)):
   
   st="".join((st,chr((ord(S[i])-65+N)%26+65)))
print(st)

Solution (Python):
n = int(input())
s = input()
ans =""
for i in range(len(s)):
    if ord(s[i]) + n > 90:
        ans += chr(64 + n + ord(s[i]) - 90)
    else:
        ans += chr(ord(s[i]) + n)
print(ans)

Solution (Python):
n = int(input())
S = list(input())
for s in S:
  code = int(ord(s)) + n
  if code > 90:
    code += -90 + 64
  print(chr(code), end="")

Solution (Python):
N = int(input())
S = input()
A = ['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','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']
ans = []
for i in range(len(S)):
    B = A.index(S[i])
    ans.append(A[B+N])
print(''.join(ans))

Solution (Python):
n = int(input())
s = input()
res = ''
for let in s:
    if ord(let) + n <= 90:
        newS = chr(ord(let)+n)
        res += newS
    elif ord(let) + n > 90:
        newS = chr((ord(let) + n) - 26)
        res += newS
print(res)

Solution (Python):
n = int(input())
s = input()

mp = ["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"]

res = ""

for c in s:
    num = 0
    for i in range(0,len(mp)):
        if mp[i] == c:
            num = i
            break
    res += mp[(num + n) % 26]
print(res)

Solution (Python):
n = int(input())
s = input()
for i in range(len(s)):
    print(chr(ord('A') + (ord(s[i]) - ord('A') + n)% 26), end="" )
print("")

Solution (Python):
n = int(input())
s = input()
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in range(len(s)):
    s_index = alpha.index(s[i])
    ans += alpha[(s_index + n) % 26]
print(ans)

Solution (Python):
import string

alp = string.ascii_uppercase
n = int(input())
word = list(input())
output = ""

for i in range(len(word)):
    idx = alp.index(word[i])
    output += alp[(idx + n) % 26]

print(output)

Solution (Python):
n = int(input())
s = input()
ai = ord('A')
ans = ''
for i in s:
    ei = ord(i) - ai
    ei = (ei + n) % 26
    ans += chr(ei + ai)
print(ans)

Solution (Python):
n = int(input())
s = input()

for ss in s:
    i = ord(ss)
    i += n
    if i>90:
        i -= 26
    ss = chr(i)
    print(ss, end='')

Solution (Python):
N=int(input())
S=list(input())
T=list(map(ord,S))
U=list(map(lambda x:x+N if x+N<=90 else x+N-26,T))
V=list(map(chr,U))
print(''.join(V))

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n=ni()
s=si()
ans=''
for ss in s:
    ans+=chr((ord(ss)+n-65)%26+65)
print(ans)

Solution (Python):
n = int(input())
sList = list(input())

for i in range(len(sList)):
  tmp = ord(sList[i])+n
  if tmp > ord('Z'):
    sList[i]= chr(ord('A')+(tmp-ord('Z')-1))
  else:
    sList[i]= chr(tmp)

print(''.join(sList))

Solution (Python):



def letter_to_int(letter):
    return ord(letter)-65


def int_to_letter(encoded_value):
    return chr(encoded_value+65)


def shift_string(N, string):
    shifted_string = ""
    for char in string:
        encoding = letter_to_int(char)
        
        shifted = (encoding+N)%26
        decoded_to_letter = int_to_letter(shifted)
        shifted_string = shifted_string + decoded_to_letter
    return shifted_string


if __name__ == "__main__":
    test1 = \
"""2
ABCXYZ"""
    test2 = \
"""0
ABCXYZ"""
    test3 = \
"""13
ABCDEFGHIJKLMNOPQRSTUVWXYZ"""
    various_tests = [test1, test2, test3]
    """for test in various_tests:
        lines = test.split("\n")
        N = int(lines[0])
        string = lines[1]
        print(shift_string(N, string))"""
    N = int(input())
    string = input()
    print(shift_string(N, string))

Solution (Python):
n=int(input())
s=input()
y=[ord(i)+n for i in s]
for i in y:
    if i>=91:
        i%=91
        print(chr(i+65),end="")
    else:
        print(chr(i),end="")

Solution (Python):
N=int(input())
S=input()
V=[]
for i in range(len(S)):
  if ord(S[i])+N>90:
    V.append(chr(int(ord(S[i]))+N-26))
  else:
    V.append(chr(int(ord(S[i]))+N))
print("".join(map(str,V)))

Solution (Python):
N = int(input())
S = input()
ans = ''
numA = ord('A')
for i in S:
    tmp = ord(i)-numA
    ans = ans + chr(numA+(tmp+N)%26)
print(ans)

Solution (Python):
n=int(input())
s=input()
al=['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']
for i,w in zip(range(len(s)),s):
    idx=al.index(w)+n
    if idx>25:
        idx-=26
    if i==0:
        word=al[idx]
    else:
        word+=al[idx]    
print(word)

Solution (Python):
n = int(input())
s = str(input())
l = ['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']
for i in range(len(s)):
    print(l[(l.index(s[i])+n)%26],end='')

Solution (Python):
N = int(input())
S = str(input())
result = ''
for s in S:
  if(ord(s) + N > ord('Z')):
    x = chr( (ord(s) + N) - 26)
  else:
    x = chr(ord(s) + N)
  result+=x
print(result)

Solution (Python):
n = int(input())
s = input()

res = []

for i in range(len(s)):
    chanum = ord(s[i]) + n
    if chanum > 90:
        num = chanum - 26
    else:
        num = chanum
    res.append(chr(num))

print("".join(res))

Solution (Python):
N = int(input())
*S, = input()
ordA = ord('A')
print("".join([chr((ord(s) - ordA + N) % 26 + ordA) for s in S]))

Solution (Python):
n=int(input())
print("".join([(chr(i+n) if i+n < 91 else chr(i+n-26)) for i in map(ord, list(input()))]))

Solution (Python):
N = int(input())
S = input()

def convert(letter, N):
    a = ord(letter) + N
    if a > 90: a = a - 26
    return chr(a)


ans = ""
for letter in S:
    ans = ans + convert(letter,N)

print(ans)

Solution (Python):
n=int(input())
s=input()
t=''
for u in s:
  t+=chr((ord(u)-65+n)%26+65)
print(t)

Solution (Python):

def ABC146B():
    N = int(input())
    S = input()
    newstr = []
    for s in S:
        newstr.append(chr(((ord(s) + N) - ord('A')) % 26 + 65))

    print(''.join(newstr))

ABC146B()

Solution (Python):
N = int(input())
S = input()
new_S = ''
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for s in range (len(S)):
    for i in range(26):
        if (S[s] == alphabet[i]):
            new_S += alphabet[i+N]
            break
print(new_S)

Solution (Python):
N = int(input())
S = input()
res = ""
for s in list(S):
    ch_num = ord(s) + N
    if ch_num > 90:
        ch_num -= 26
    res += chr(ch_num)
print(res)

Solution (Python):
def conv(c, n):
    p = ord(c) + n
    if p > ord("Z"):
        p -= (ord("Z") - ord("A") + 1)
    return chr(p)


N = int(input())
S = list(input())

print("".join(conv(c, N) for c in S))

Solution (Python):
n = int(input())
s = input()
x = ""
for i in s:
    if ord(i) + n >= 91:
        x += chr(65 + ord(i) + n - 91)
    else:
        x += chr(ord(i) + n)
print(x)

Solution (Python):
N = int(input())
S = input()
Alphabet = [chr(i) for i in range(65, 65+26)]
ans = ''
for i in range(len(S)):
  index = Alphabet.index(S[i])+N
  if index > 25:
    index -= 26
  ans += Alphabet[index]
print(ans)

Solution (Python):
n = int(input())
s = str(input())
result = ""
for i in s:
  slide = n
  if ord(i) + slide > ord("Z"):
    slide = slide - 26
  result += chr(ord(i) + slide)
  
print(result)

Solution (Python):
N = int(input())
S  = input()
t = ' '
for s in S:
 t += chr((ord(s) + N - 65 ) % 26 +65) 
print(t)

Solution (Python):
n = int(input())

l = list(input().strip())

for c in l:
  tmp = ord(c) + n
  if tmp <= ord('Z'):
    print(chr(tmp),end="")
  else:
    print(chr(tmp%ord('Z') + ord('A')-1),end="")

Solution (Python):
N = int(input())
S = input()

print(''.join(list(map(lambda x:chr((ord(x)-ord('A')+N) % 26 + ord('A')),S))))

Solution (Python):
n = int(input())
s = input()

Z = ord('Z')
ans = ''

for c in s:
  d = ord(c) + n
  ans += chr(d - 26 if d > Z else d)

print(ans)

Solution (Python):
n = int(input())
s = input()

ans = ''

for c in s:
  d = ord(c) + n
  ans += chr(d - 26 if d > ord('Z') else d)

print(ans)

Solution (Python):
N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''

for s in S:
  code=a.index(s)+N
  if code>a.index('Z'):
    code-=26
  res+=a[code]
print(res)

Solution (Python):
N = int(input())
S = list(input())
ans = []
for i in range(len(S)):
    if (ord(S[i])+N) > 90:
        ans.append(chr(ord(S[i])+N-90+64))
    else:
        ans.append(chr(ord(S[i])+N))
print(*ans,sep='')

Solution (Python):
N = int(input())
S = input()
H = [""] * len(S)

for i in range(len(S)):
  work = ord(S[i]) + N 
  if work > ord('Z') : 
    work -= 26

  H[i] = chr(work)
  
print("".join(H))

Solution (Python):
import math
import calendar
import fractions
import itertools

n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in s:
    if i == "z":
        ans += "A"
    i_index = alpha.index(i)
    ans_char_index = 100
    if i_index + n <= len(alpha) - 1:
        ans_char_index = i_index + n
    else:
        ans_char_index = (n - (len(alpha) - 1 - i_index)) % 26 - 1
    ans += alpha[ans_char_index]
print(ans)

Solution (Python):
n = int(input())
s = input()

def caesar(text, k):
    result = ""
    for i in range(len(text)):
        c1 = text[i]
        n1 = ord(c1)
        if 65 <= n1 <= 90:
            n2 = n1 + k
            if n2 < 65 or 90 < n2:
                n2 = 65 + (n2 - 65) % 26
            result = result + chr(n2)
        else:
            result = result + chr(n1)
    return result

ss = caesar(s, n)
print(ss)

Solution (Python):
n = int(input())
s = list(input())

ref = [chr(i) for i in range(65, 65+26)]

c = [ref.index(x)+n for x in s]
t = [ref[i] if i < 26 else ref[i-26] for i in c]
print(''.join(t))

Solution (Python):
N=int(input())
S=str(input())
sen=''
for i in range(len(S)):
    if ord(S[i])+N>90:
        sen+=chr(ord(S[i])+N-26)
    else:
        sen+=chr(ord(S[i])+N)
print(sen)

Solution (Python):
N=int(input())
S=input()

ans=''

for i in S:
  n=ord(i)+N-65
  n%=26
  ans+=chr(n+65)
print(ans)

Solution (Python):
N=int(input())
S=input()
ans=''
for s in S:
  n=(ord(s)+N-65)%26
  ans+=chr(n+65)
print(ans)

Solution (Python):
N = int(input())
S = list(map(ord, (str(input()))))
 
 
def Plus(x):
    x += N
    while(x>=91):
        x=64+(x%90)
    return x
 
print(''.join(list(map(chr, (list(map(Plus, S)))))))

Solution (Python):
def _rot(N):
    def rot(c):
        return chr(((ord(c) - ord('A') + N) % 26) + ord('A'))
    return rot

rot = _rot(int(input()))
print(''.join(map(rot, input())))

Solution (Python):
N = int(input())
S = list(input())

stack = ""
mi = ord('A')
mx = ord('Z')

for i in S :
    if ord(i)+N <= mx:
        stack = stack + chr(ord(i)+N)
    else:
        mem = ord(i)+N
        while mem > mx:
            mem = mem-26
        stack = stack + chr(mem)

print(stack)

Solution (Python):
n=int(input())
s=input()
alfa = [chr(i) for i in range(65,65+26)]
ans = []
for i in range(len(s)):
    tmp = alfa.index(s[i])+n
    if tmp >= 26:
        tmp -= 26
    print(alfa[tmp],end="")

Solution (Python):
N = int(input())
S = list(input())

mi = ord('A')
ma = ord('Z')

res = ''
for s in S:
    code = ord(s) + N
    if code > ma:
        code -= (ma - mi + 1)
    res += chr(code)

print(res)

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()

output = ""
for s in list(S):
    output += chr((ord(s) + N - 65) % 26 + 65)
print(output)

Solution (Python):
def main():
    N = int(input())
    S = input()

    slist = list(S)
    result = slist

    for i in range(len(S)):
        if ord(slist[i]) + N > 90:         
            result[i] = chr(ord(slist[i]) + N - 26)
        else:
            result[i] = chr(ord(slist[i]) + N)

    print(''.join(result))

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    S = input()

    for s in S:
        if (ord(s)+N) > ord("Z"):
            print(chr(ord(s)-26+N), end="")
        else:
            print(chr(ord(s)+N), end="")
    return 0
if __name__ == '__main__':
    main()

Solution (Python):

n=int(input())
print(''.join([chr((ord(i)-65+n)%26+65) for i in input()]))

Solution (Python):
n = int(input())
s = input()

print("".join([chr((((ord(x) + n) - ord("A")) % 26) + ord("A")) for x in s]))

Solution (Python):
n=int(input())
s=list(input())
for i in range(len(s)):
  s[i]=chr((ord(s[i])-ord('A')+n)%26+ord('A'))
print(''.join(s))

Solution (Python):
N=int(input())
S=input()
ans=""

a=ord('A')

for i in range(len(S)):
    order=( ord(S[i])-a+N )%26
    
    ans+=chr(order+a)
print(ans)

Solution (Python):
def solve(N, S):
    alp = [chr(i) for i in range(65, 65+26)]
    new_text = ''

    for i in range(len(S)):
        new_char_i = alp.index(S[i]) + N

        if new_char_i >= len(alp):
            new_char_i -= len(alp)

        new_text += alp[new_char_i]

    return new_text


N = int(input())
S = input()

print(solve(N, S))

Solution (Python):
def charachange(ch, n):
    point =(ord(ch))
    point = point + n
    if point > 90:
        point = 64 + (point - 90)
    return chr(point)

N = int(input())
S = input()
result = ""
for i in range(len(S)):
    result += charachange(S[i], N)

print(result)

Solution (Python):
n = int(input())
s = str(input())

s = list(s)
for i in range(len(s)):
    print(chr(65 + (ord(s[i]) - 65 + n)%26),end='')
print('')

Solution (Python):
def a2a(alpha,n):
    if ord(alpha)+n-ord("A")<26:
        return chr(ord(alpha)+n)
    else:
        return chr(ord(alpha)+n-26)
N=int(input())
S=input()
ans=""
for t in S:
    ans=ans+a2a(t,N)
print(ans)

Solution (Python):
import string

N = int(input())
S = input()

for a in S:
    index = string.ascii_uppercase.index(a)
    index = (index + N) % 26
    print(string.ascii_uppercase[index], sep='', end='')

Solution (Python):
letters = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
L = len(letters)

n = int(input())
word = input()
result = ''

for letter in word:
  idx = letters.index(letter)
  f_idx = (idx + n) % L
  result += letters[f_idx]

print(result)

Solution (Python):
letters = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
L = len(letters)

n = int(input())
n %= L
word = input()
result = ''

for letter in word:
  idx = letters.index(letter)
  moves = n
  diff = L - idx
  f_index = idx
    
  if moves + idx >= L:
    f_index = moves - diff
  else:
    f_index = idx + moves
    
  result += letters[f_index]
  
print(result)

Solution (Python):
n = int(input())
s = input()
li=[]
for i in range(len(s)):
  num = ord(s[i])
  num = num -65
  num = (num+n)%26
  li.append(chr(num+65))
ans = "".join(li)
print(ans)

Solution (Python):
'''input
2
ABCXYZ
'''

from sys import stdin
input = stdin.readline



n = int(input().strip())
string = list(input().strip())
for i in range(len(string)):
	if ord(string[i]) + n > 90:
		string[i] = chr(64 + n - (90 - ord(string[i])))
	else:
		string[i] = chr(ord(string[i]) + n)

print(''.join(string))

Solution (Python):
N = int(input())
S=input()



S2=[chr(ord(s)+N) if ord(s)+N<=ord('Z') else chr(ord(s)+N-26) for s in S]
answer = ''.join(S2)
print(answer)

Solution (Python):
N=int(input())
S=input()
Slong=len(S)
T=""

import string

eng=string.ascii_uppercase*2

for i in range(Slong):
    m= eng.find(S[i])
    m= m + N
    T=T+eng[m]

print(T)

Solution (Python):
N = int(input())
S = input()
ans = ""

for i in range(len(S)):
    if ord(S[i]) + N > ord("Z"):
        ans += chr(ord(S[i]) + N - (ord("Z") - ord("A") + 1))
    else:
        ans += chr(ord(S[i]) + N)
print(ans)

Solution (Python):

N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'A':1, 'B':2, 'C':3, 'D':4, 'E':5, 'F':6, 'G':7, 'H':8, 'I':9, 'J':10, 'K':11, 'L':12, 'M':13,
            'N':14, 'O':15, 'P':16, 'Q':17, 'R':18, 'S':19, 'T':20, 'U':21, 'V':22, 'W':23, 'X':24, 'Y':25, 'Z':26}

number_alphabet = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H', 9:'I', 10:'J', 11:'K', 12:'L', 13:'M',
                   14:'N', 15:'O', 16:'P', 17:'Q', 18:'R', 19:'S', 20:'T', 21:'U', 22:'V', 23:'W', 24:'X', 25:'Y', 26:'Z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))

Solution (Python):
def resolve():
    N = int(input())
    S = input()
    answer = encrypt_ceasor(S, N)
    print(answer)

      
def encrypt_ceasor(text, n):
    result = ""
    for i in range(len(text)):
        char = text[i]
        if char.isupper():
            result += chr((ord(char) + n - 65) % 26 + 65)
        else:
            result += chr((ord(char) + n - 97) % 26 + 97)
    return result


if __name__ == "__main__":
    resolve()

Solution (Python):
A=[chr(i) for i in range(65, 65+26)]
N=int(input())
S=str(input())
T=[]
U=str()

for i in range(len(S)):
  k=(A.index(S[i])+N)%26
  T.append(A[k])
  U=U+str(T[i])
  
print(U)

Solution (Python):
n = int(input())
S = input()
ans = ''.join([chr((ord(s) - ord('A') + n) % 26 + ord('A')) for s in S])
print(ans)

Solution (Python):
import string
alphabet = string.ascii_uppercase
 
N = int(input())
chara = input()
 
for ch in chara:
  index = alphabet.index(ch)
  pr = alphabet[(index + N) % 26]
  print(pr,end = '')

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(N: int, S: str):
    ret = ''
    for c in S:
        ret +=  chr(ord('A') + (ord(c) - ord('A') + N) % 26)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()