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):

import sys

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement


from operator import itemgetter
from sys import stdin

from operator import mul
from functools import reduce
from collections import Counter





j=0
k=0
n=3
r=1
a=[0]






"1行1つの整数を入力を取得し、整数と取得する"




"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

for i in number_list:
    print(number_list[i-1])

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''



"正方行列にstr型の値を入力"
'''




'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"


'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''











'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''




"aという変数に入っているものを大文字にして出力"

















'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''


'''
def cmb(n,r):
    
    r= min(n-r,r)
    
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    
    
    

    under = reduce(mul, range(1, r+1))
    
    
    
    

    return over // under
    
    
    
    
a = cmb(n, r)

'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD

combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''




for i in a.most_common(n):print(i)





 


'''









'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''


def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        
        if n % k == 0:
            return False
            
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  

'''

def factorial(x, mod=10**9+7):
    
    
    
    tmp = 1
    for i in range(1, x+1):
        tmp = (tmp * i) % mod
    return tmp
    '''
    Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large.
    But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does.
    '''











def main():
    n=3
    steps=0
    state=0
    w=1
    j=0
    k=0
    n=int(input())
    s=input()
    ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    
    
    
    
    
    a=[i for i in ascii_uppercase]
    b=[i for i in s]
    c=[]
    a.insert(0, 'Z')
    
    for i in range(len(b)):
        x=a.index(b[i])
        c.append(a[(x+n)%26])
    print(''.join(c))
    
    
    


    for i in range(1,n+1,2):
     pass
     

    l = ['aaa', 'bbb', 'ccc']

    
    
    

    
        
    
    

    
    
    
    
    DP = np.zeros(w+1, dtype=int)
    exdp=np.zeros((3,4)) 
    
    
    
        
        
    
    
        
        
    


    
    



    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]
    

    ls = ["a", "b", "c", "d", "e"]


    
    

    
    

    
    
    
    
    
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
s=input()
b=""
for i in s:
    a=(ord(i)-ord("A")+n)%26
    b+=chr(a+ord("A"))
print(b)

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

ans = ''
for s in S:
    nc = ord(s) + N
    if nc > ord('Z'):
        nc = nc - 26
    ans += chr(nc)
print(ans)

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

dic = ['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)):
    ans += dic[(dic.index(S[i])+N)%26]

print(ans)

Solution (Python):
N = int(input())
S = str(input())
ans = []
lst = ['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)):
    tmp = lst.index(S[i])
    tmp += N
    if tmp > 25:
        tmp -= 26
    ans.append(lst[tmp])
print(''.join(ans))

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
s=input()
ans=''
for i in s:
    ans+=chr(((ord(i)-65+n)%26)+65)
print(ans)

Solution (Python):
MOD =26

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

for i in range(0,len(S),1):
    S[i] = (ord(S[i])+N -65)%MOD + 65
print("".join(list(map(chr,S))))

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

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

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

print("".join(s))

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

for i in range(len(s)):
    k = ord(s[i]) + n
    if(k> 90):
        c = k - 90
        k = 64 + c

    print(chr(k),end = "")

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

s = input()

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"



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

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
num2alp = {}
alp2num = {}
for i, a in enumerate(alphabet):
  num2alp[i] = a
  alp2num[a] = i
  
n = int(input())
sss = input()

out = ''
for s in sss:
  num = alp2num[s]
  num = (num + n) % 26
  s = num2alp[num]
  out += s
  
print(out)

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

Solution (Python):
N = int(input())
S = list(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']
for i in range(len(S)):
  c = (A.index(S[i])+N)%26
  S[i] = A[c]
print("".join(S))

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


def rot_n(s, n):
    answer = ''
    for letter in s:
        answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26)

    return answer

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=input()
ans=''
for i in a:
    p=ord(i)+n
    if p>ord('Z'):
        p-=26
    ans+=chr(p)
print(ans)

Solution (Python):
n = int(input())
s = input()
st = ''
t = 0 

for i in s:
  if ord(i)+n >= 91:
    t = 64+ord(i)+n-90
    st += chr(t)
  else:
    t = ord(i) + n
    st += chr(t)
    
print(st)

Solution (Python):
n = int(input())
s = input()
S = ''
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']*2
 
for i in s:
  S += list[list.index(i) + n]
  
print(S)

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

ans = ""

for i in range(len(s)):
    ans += chr(ord("A") +(((ord(s[i])+n)-ord("A")) % 26))

print(ans)

Solution (Python):
N = int(input())
S = str(input())
ans = []
tmp = 0

for i in range(0,len(S)):
  tmp = N+ord(S[i])
  if tmp >= 91:
    tmp = tmp - 26
  ans.append(chr(tmp))

print("".join(ans))

Solution (Python):
a=int(input())
s=input()
for i in range(len(s)):
  d=ord(s[i])+a
  if d>=91:
    d-=26
  print(chr(d),end="")

Solution (Python):

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


if N > 0:
    ord_z = ord("Z")
    ord_a = ord("A")

    op = ""

    for i, s in enumerate(S):
        ord_s = ord(s) + N

        
        if ord_s > ord_z:
            rem = ord_s % ord_z - 1
            ord_s = ord_a + rem

        chr_s = chr(ord_s)
        op += chr_s

    print(op)
else:
    print(S)

Solution (Python):


import sys

def input():
    return sys.stdin.readline().rstrip('\n')

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


alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"


asciiA = ord('A')

def ord_rel_a(c):
    return ord(c) - asciiA

def chr_rel_a(i):
    j = i + asciiA
    return chr(j)

iZ = ord_rel_a('Z')

Shift = ""

for c in S:
    i = ord_rel_a(c)
    j = (i + N) % (iZ+1)
    Shift += chr_rel_a(j)

print(Shift)

Solution (Python):

n = int(input())
s = input()
strS = []
for i in range(len(s)):
    charnum = ord(s[i])
    if charnum+n > 90:
        charnum = 64 + (charnum+n - 90) 
    else:
        charnum += n

    strS.append(chr(charnum))
ans = "".join(strS)
print(ans)

Solution (Python):
import string
n = int(input())
a = input()
fin = []
lst = [i for i in string.ascii_uppercase]

for j in a:
    num = lst.index(j)
    ser = (num + n) % 26
    fin.append(lst[ser])

print("".join(fin))

Solution (Python):
n = int(input())
s = input()
alphabet = [chr(i) for i in range(ord('A'), ord('Z')+1)]
encode = alphabet[n:] + alphabet[:n]
text = ""
for c in s:
    text = text + encode[alphabet.index(c)]
print(text)

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

Solution (Python):
n = int(input())
s = input()
for i in range(len(s)):
    print (chr(ord(s[i])+n), end="") if ord(s[i])+n <= 90 else print (chr(ord(s[i])+n-26), end="")
print ()

Solution (Python):
n = int(input())
s = input()
alphabet = [chr(i) for i in range(ord('A'), ord('Z')+1)]
encode = alphabet[n:] + alphabet[:n]
text = ""
for c in s:
    text = text + encode[alphabet.index(c)]
print(text)

Solution (Python):
n = int(input())
s = input()
alphabet = [chr(i) for i in range(ord('A'), ord('Z')+1)]
encode = alphabet[n:] + alphabet[:n]
text = []
for c in s:
    text.append(encode[alphabet.index(c)])
print(''.join(text))

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

Solution (Python):
N = int(input())
S = input()
ans =""
for i in S:
    s_int = ord(i)+N
    if s_int>90:
        s_int=65+(s_int%91)
    ans+=chr(s_int)
print(ans)

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

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

x = list(s)

for i in range(0,len(s)):
  for j in range(0,len(a)):
    if(x[i] == a[j]):
      t = j
      x[i] = a[t+n]
      break
b = ''.join(x)
print(b)

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

ans = ""
for c in S:
    num = ord(c) - ord('A')
    ans += chr(ord('A') + (num + N) % 26)

print(ans)

Solution (Python):
import string
N = int(input())
C = list(input())
L = list(string.ascii_uppercase)
count = 0
for i in C:
    for j in L:
        if i == j:
            break
        count += 1
    if count + N <= 25:
        print(L[count+N], end='')
    else:
        print(L[count+N-26], end='')
    count = 0

Solution (Python):
def shift(c, n):
    index = ord(c) - ord('A')
    index += n
    index %= 26
    return chr(index + ord('A'))


N = int(input())
S = input()
print(''.join([shift(c, N) for c in S]))

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

def alpha(a):
    return ord(a)-65

def enum(i):
    return chr(i+65)

list = [enum((alpha(s)+N)%26) for s in list(S)]

print("".join(list))

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

for c in S:
    num = ord(c) - ord("A")
    num = (num + N) % 26
    ans += chr(ord("A") + num)

print(ans)

Solution (Python):
n=int(input())
s=input()
ans=''
for ss in s:
  if ord(ss)+n<=ord('Z'):
    ss=chr(ord(ss)+n)
  else:
    ss=chr(ord(ss)+n-26)
  ans+=ss
print(ans)

Solution (Python):
import fileinput

n = int(input())


def slip(c):
    return chr(((ord(c) - 65 + n) % 26) + 65)


s = list(input())

for i in range(len(s)):
    s[i] = slip(s[i])

print("".join(s))

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

Solution (Python):
n = int(input())
s = input()
t = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2)
a = ''
for i in s:
	a += t[t.index(i)+n]
print(a)

Solution (Python):
n=int(input())
s=list(input())
a=[]
for i in range(len(s)):
  if ord(s[i])+n<=90:
    a.append(chr(ord(s[i])+n))
  elif ord(s[i])+n>90:
    a.append(chr(ord(s[i])+n-26))
  
    """
for k in range(len(s)):
  if ord(a[k])>90:
    s[k]=chr(ord(a[k])-90+64)
    """
b=''
for j in range(len(a)):
  b+=a[j]
print(b)

Solution (Python):
N = int(input())
l = []
S = str(input())

for i in range(len(S)):
  l.append(S[i])

for i in range(len(l)):
  if ord(l[i]) + N > 90:
    l[i] = chr(ord(l[i]) + N - 26)
  else:
    l[i] = chr(ord(l[i]) + N)
ans = ''.join(l)
print(ans)

Solution (Python):
n=int(input())
s=input()
li = []
for i in range(26):
    li.append(chr(ord('A')+i))
ans = ""
for st in s:
    ind = (li.index(st) + n) % 26
    ans += li[ind]
print(ans)

Solution (Python):
n = int(input())
s = input()
ans = ''
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
    ans += alpha[alpha.find(s[i])+n]
print(ans)

Solution (Python):
N = int(input())
S = input()
A = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
NS = []
for i in range(len(S)):
    NS.append(A[A.index(S[i])+N])
print(''.join(NS))

Solution (Python):
n=int(input())
S=input()
print("".join(chr(65+(ord(s)-65+n)%26)for s in S))

Solution (Python):
a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
n=int(input())
s=input()
x=list()
for i in range(len(s)):
    x=x+[a[ord(s[i])-65+n]]
print("".join(x))

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

Solution (Python):
n = int(input())
S = input()
new_S = ''
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for d in range(len(S)):
    for p in alp:
        if S[d] == p:
            i = int(alp.index(p))
            i = i + n
            if i >= 26:
                i = i - 26
            new_S += alp[i]
print(new_S)

Solution (Python):
def convert(S,N):
    i = ord(S)
    if (i + N > 90):
        c_i = i + N - 26
    else:
        c_i = i + N 
    return c_i

def main():
    N = int(input())
    S = input()
    s = ' '
    for i in range(len(S)):
        s += chr(convert(S[i],N))
    print(s[1:])
    return 0
    
if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
s=input()
s_list=list(s)
for i in range(len(s_list)):
    new_s=ord(s_list[i])+n
    if new_s<=90:
        s_list[i]=chr(new_s)
    else:
        s_list[i]=chr(new_s-26)
str_changed = "".join(s_list)
print(str_changed)

Solution (Python):

n=int(input())
s=input()
res=''

for i in s:
    a=ord(i)+n
    if a>90:
        a-=26
    res+=chr(a)

print(res)

Solution (Python):
n = int(input())
s = input()
b = ''
for i in s:
  a = ord(i) + n
  if a > 90:
    a -= 26
  b += chr(a)
print(b)

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

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

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

import string


def main():
    N = int(input())
    s = input().rstrip()
    a = string.ascii_uppercase
    b = (a*2)[N:N+27]
    b = {i:j for i, j in zip(a, b)}
    b = str.maketrans(b)
    print(s.translate(b))


if __name__ == '__main__':
    main()

Solution (Python):
alpha_dict = {}
id_dict = {}
for i,c in enumerate(range(ord('A'),ord('Z')+1)):
  alpha_dict[chr(c)] = i + 1
  id_dict[i+1] = chr(c)

N = int(input())
S = list(input())
T = []
for s in S:
  n = alpha_dict[s]
  n += N
  if n > 26:
    n -= 26
  T += [id_dict[n]]
print("".join(T))

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

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

s = list(input())

al = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

ans = []

for i in s:
    ans.append(al[al.index(i)+n])
    
for i in ans:
    print(i,end = "")

Solution (Python):
n=int(input());print("".join([chr((n+ord(x),n+ord(x)-26)[ord(x)>90-n])for x in input()]))

Solution (Python):

n = int(input())
s = input()
ans = ''
abc = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')*2
for i in range(len(s)):
    ans += abc[abc.index(s[i])+n]
print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce


import sys
def I(): return int(input())  
def Is(): return map(int, input().split())  
def LI(): return list(map(int, input().split()))  
def TI(): return tuple(map(int, input().split()))  
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  
def LS(): return list(input())  
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

n = I()
s = S()  
ans = ""
for i in range(len(s)):
    tmp = ord(s[i]) + n
    if tmp > 90:
        ans += chr(tmp - 91 + 65)
    else:
        ans += chr(tmp)
print(ans)

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

ans = [chr(((((ord(s))+N)-65)%26)+65) for s in S]

print(*ans, sep="")

Solution (Python):
a=int(input())
b=list(input())
for i in range(len(b)):
    if ord(b[i])+a>90:
        b[i]=chr(ord(b[i])+a-26)
    else:
        b[i]=chr(ord(b[i])+a)
print(''.join(b))

Solution (Python):


abc = [s for s in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']
N = int(input())
S = str(input())

def f(ch, n):
    if len(abc) - 1 < abc.index(ch) + n:
        return abc[(abc.index(ch) + n) - len(abc)]
    else:
        return abc[abc.index(ch) + n]

ans = ''
for s in S:
    ans += f(s, N)

print(ans)

Solution (Python):
n = int(input())
s = input()
x = ['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']
y = []
for i in range(len(s)):
    for j in range(len(x)):
        if s[i] == x[j]:
            y.append(x[(j+n)%26])
ans = ''.join(y)
print(ans)

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

Solution (Python):

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

for s in S:
    temp = ord(s)+N
    if temp > ord('Z'):
        temp = ord('A') + temp - ord('Z') -1
    print(chr(temp), sep="", end="")
print()

Solution (Python):
n = int(input())
s = input()
x = ['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']
y = []
for i in range(len(s)):
    for j in range(len(x)):
        if s[i] == x[j]:
            y.append(x[(j+n)%26])
ans = ''.join(y)
print(ans)

Solution (Python):
import string
N=int(input())
S=list(str(input()))

Alphabet_List=list(string.ascii_uppercase)
Alphabet_List.extend(2*Alphabet_List)

for i in range(len(S)):
    for j in range(len(Alphabet_List)):
        if S[i]==Alphabet_List[j]:
            S[i]=Alphabet_List[j+N]
            break
            
print(("").join(S))

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


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

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

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

print(ans)

Solution (Python):
def minus26(idx):
    while idx >= 26:
        idx = idx - 26
    return idx
    
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']

S_idx = [alphabet.index(s)+N for s in S] 
S_idx = [minus26(idx) for idx in S_idx]
print(''.join([alphabet[idx] for idx in S_idx]))

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']
answer = []
for s in S:
    number = alphabet.index(s)
    while number + N >= 26:
        number = number - 26 
    answer.append(alphabet[number+N])
print(''.join(answer))

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']
answer = []
for s in S:
    number = alphabet.index(s)
    while number + N >= 25:
        number = number - 26 
    answer.append(alphabet[number+N])
print(''.join(answer))

Solution (Python):
n = int(input())
S = input()
s = list(S)
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
al = list(alph)
for i in range(len(s)):
    s[i] = al[al.index(s[i])+n]
print(''.join(s))

Solution (Python):
N=int(input())
S=input()
L='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
  a=S[i]
  index=L.find(a)
  b=L[index+N]
  ans=ans+b
print(ans)

Solution (Python):
n = int(input())
s = input()
moji = []
for i in s:
    num = ord(i)+n
    if num>90:
        num -= 26
    newmoji = chr(num)
    moji.append(newmoji)
print(''.join(moji))

Solution (Python):
n = int(input())
s = list(input())
test = []

for i in s:
  test.append(chr((ord(i) - 65 + n) % 26 + 65))

print(''.join(test))

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    s=input()
    al = list(chr(ord('A') + i) for i in range(26))
    l=[]
    for j in s:
        l.append(al[(al.index(j)+n)%26])
    print(''.join(l))
resolve()

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

Solution (Python):
n = int(input())
s = input()
lst_search = [chr(i) for i in range(65, 65+26)]
lst = [chr(i) for i in range(65, 65+26)] *2


ans = ''
for i in s:
    idx = lst_search.index(i)
    ans += lst[idx+n]

print(ans)

Solution (Python):
A=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N=int(input())
S=list(input())
lenS=len(S)
for i in range(lenS):
    for j in range(len(A)):    
        if S[i]==A[j]:
            if j+N >=25:
                k=j-25+(N-1)
            else:
                k=j+N
    S[i]=A[k]
print(''.join(S))

Solution (Python):
N = int(input())
S = list(input())
L = [chr(i) for i in range(ord("a"), ord("z") + 1)]


res = ""
for s in S:
    res += chr((ord(s) - ord("A") + N) % (ord("Z") - ord("A") + 1) + ord("A"))
    
print(res)

Solution (Python):
n = int(input())
s = input()
x = ['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']
y = []
for i in range(len(s)):
    for j in range(len(x)):
        if s[i] == x[j]:
            y.append(x[(j+n)%26])
ans = ''.join(y)
print(ans)

Solution (Python):
n=int(input())
str=input()
a="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for st in str:
  x=int(a.find(st))
  x+=n
  if x>=26:
     print(a[x-26],end="")
  else:
     print(a[x],end="")

Solution (Python):
n = int(input())
s = list(input())
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', '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']
moji = ''

for i in range(len(list)):
  list[i] = list[i].upper()

for i in range(len(s)):
  num = list.index(s[i])
  s[i] = list[num + n]
  moji = moji + s[i]
  
print(moji)

Solution (Python):

n=int(input())
s=list(input())
temp=['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)):
    s[i]=temp[((temp.index(s[i]))+n)%26]
print(*s,sep='')

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

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

Solution (Python):
N=int(input())
S=input()
output=""
L="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(L)):
        if S[i]==L[j]:
            output=output+L[(j+N)%len(L)]
print(output)

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

alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

ans =''
for i in range(len(S)):
    tmp_str=S[i]
    
    index = alphabet.find(tmp_str)

    rpl_str=alphabet[index+N]

    ans+=rpl_str

print(ans)

Solution (Python):
import string
n= int(input())
s= input()
a= string.ascii_uppercase
res = ''
for i in s:
    k=a.index(i)+n
    if k > 25:
        res += a[k-26]
    else:
        res += a[k]
print(res)

Solution (Python):
KEY = int(input())
PLAIN = input().lower()


enc = ""

for char in list(PLAIN):
    ASCII = ord(char)
    num = ASCII - 97
    num = (num + KEY) % 26
    ASCII = num + 97
    enc += chr(ASCII)

print(enc.upper())

Solution (Python):
import string
n = int(input())
s = input()
a = string.ascii_uppercase
res = ''
for i in s:
    k = a.index(i) + n
    if k > 25:
        res += a[k-26]
    else:
        res += a[k]
print(res)

Solution (Python):
n = int(input())
s = list(input())
alp = [chr(i) for i in range(65,65 +26)]
i = 0
l = []
while i < len(s):
  num = alp.index(s[i])
  l.append(alp[(num + n)%26])
  i += 1
print(''.join(l))

Solution (Python):
n = int(input())
s = str(input())
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
teb = alp[n:26]+alp[0:n]
ans = ''
for w in s:
    ans += teb[alp.index(w)]
print(ans)

Solution (Python):
n= int(input())
s = input()
a =''
b= 0
for i in range(len(s)):
    b = ord(s[i])  
    b += n
    if b >90:
        b =b-90+64
    a += chr(b)
    
print(a)

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

alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''

for i in range(len(s)):

    for j in range(26):
        if s[i]==alp[j]:
            ans += alp[(j+n) % 26]

print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()

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

print()

Solution (Python):


N = int(input())
S = input()
max_val = ord('Z')
N_mod = N % 26

ans = ''

for i in range(len(S)):
    a = ord(S[i]) + N_mod
    if a > max_val:
        a = a - 26

    ans += chr(a)

print(ans)

Solution (Python):
N = int(input())
S = list(str(input()))
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")


ans = []

for i in range(len(S)):
    
    ans.append(alp[alp.index(S[i])+N-26])

print("".join(ans))

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

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

Solution (Python):
A = "abcdefghijklmnopqrstuvwxyz"
n = int(input())
N = input()
for i in range(len(N)):
  a = A.index(N[i].lower())
  a += n
  if a >= 26:
    a -= 26
  print(A[a].upper(),end="")
print("")

Solution (Python):
N = int(input())
S = list(input())
B = []
for a in S:
    b = ord(a) + N
    if ord(a) + N > 90:
        B.append(chr(b-26))
    else:
        B.append(chr(b))

for a in B:
    print(a, end="")

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

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

alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in range(len(S)):
    index = alphabet.index(S[i])
    if index + N < 26:
        S[i] = alphabet[index+N]
    else:
        S[i] = alphabet[index+N-26]

S = "".join(S)
print(S)

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

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

S2=[]
for s in S1:
  c1=ord(s)-ord('A')
  c2=(c1+N)%26
  S2.append(chr(ord('A')+c2))
  
print("".join(S2))

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 = ""
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 os


def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

def main():
	n = int(input())
	s = input()
	result = ""
	for i in s:
		num = alpha2num(i)
		if num + n > 26:
			num = num + n - 26
		else:
			num += n
		string = num2alpha(num)
		result += string
	print(result)
	

if __name__ == "__main__":
	main()