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

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

Solution (Python):
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") 

n = int(input())
s = input()
ans=""
for _ in s:
    num = ord(_)+n
    if 90 < num:
        num -= 26
    ans+=chr(num)
print(ans)

Solution (Python):

"""
B - ROT N
https://atcoder.jp/contests/abc146/tasks/abc146_b

"""
import sys


from string import ascii_uppercase

def solve(N, S):
    t = ascii_uppercase[N:] + ascii_uppercase[:N]
    return S.translate(str.maketrans(ascii_uppercase, t))


def main(args):
    N = int(input())
    S = input()
    ans = solve(N, S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

ans = ""
for si in s:
    buf = ord(si) + n
    if buf > ord("Z"): buf += ord("A") - ord("Z") - 1
    ans += chr(buf)

print(ans)

Solution (Python):
N = int(input())
S = input()
Ans = []
for s in S:
    a = ord(s) + N
    while a > 90:
        a -= 26
    Ans.append(chr(a))

print(''.join(Ans))

Solution (Python):
n = int(input())
s = input()
t = []
for S in s:
    if ord(S) + n <= 90:
        t.append(chr(ord(S) + n))
    else:
        t.append(chr(ord(S) + n - 26))
print("".join(t))

Solution (Python):
N=int(input())
S=input()
Z=[]
count=len(S)

for i in range(count):
    tmp=ord(S[i])
    if tmp+N>90:
        tmp=tmp+N-26
    else:
        tmp+=N
    Z.append(chr(tmp))


L=[str(a) for a in Z]
L="".join(L)
print(L)

Solution (Python):
N = int(input())
S = list(input())
T = ['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)):
  idx = T.index(S[i])
  idx += N
  if idx > len(T)-1:
    idx = idx-len(T)
    S[i] = T[idx]
  else:
    S[i] = T[idx]
print(''.join(S))

Solution (Python):
def actual(n, s):
    
    answer = ''

    ord_A = ord('A')

    for char in s:
        x = ord(char) - ord_A  
        y = (x + n) % 26  
        z = y + ord_A  

        answer += chr(z)

    return answer


n = int(input())
s = input()
 
print(actual(n, s))

Solution (Python):
def main():
    N = int(input())
    S = input()
    result = ""
    for i in S:
        ch = ord(i)
        if ch + N > 90:
            result += chr(ch - 90 + N + 64)
        else:
            result += chr(ch + N)

    print(result)


if __name__ == "__main__":
    main()

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

for i in s:
    ch=ord(i)
    if ch+n>90:
        ans+=chr(97+ch+n-123)
    else:
        ans+=chr(ch+n)
print(ans)

Solution (Python):
n = int(input())
r = ""
S = input()
for s in S:
    m = ord(s)+n
    if m > ord("Z"):
        m -= 26
    r += chr(m)
print(r)

Solution (Python):
import string

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

string_list = list(string.ascii_uppercase)

for i in S:
    if string_list.index(i) + N <=25:
        print(string_list[string_list.index(i) + N ], end='')
    else:
        print(string_list[string_list.index(i) + N  - 26], end='')

Solution (Python):
def resolve():
    N = int(input())
    S = input()
    abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ans = ""
    for i in range(len(S)):
        ans += abc[(abc.index(S[i])+N)%26]
    print(ans)
resolve()

Solution (Python):
n = int(input())
s = input()
abc =['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 += abc[(abc.index(s[i]) + n) % 26]
print(ans)

Solution (Python):
alf = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'

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

for i in range(len(S)):
    for j in range(26):
        if S[i] == alf[j]:
            S[i] = alf[j + N]
            break

ans = ''.join(S)

print(ans.upper())

Solution (Python):
n=int(input())
print(*[chr((ord(i)-65+n)%26+65) for i in input()],sep="")

Solution (Python):
def rotn(n, s):

    ans = ""

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

    return ans

def main():
    n = int(input())
    s = list(str(input()))
    print(rotn(n, s))

if __name__ == '__main__':
    main()

Solution (Python):


def main():
    N = int(input())
    S = input()
    ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    print("".join([ABC[(ABC.find(c) + N) % 26] for c in S]))

if __name__ == '__main__':
    main()

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):
ROT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
N = int(input())
S = input()
def rot(ROT, N, c):
  return ROT[ROT.find(c)+N]
print("".join(rot(ROT, N, c) for c in S))

Solution (Python):
import sys
import decimal 

def input():
    return sys.stdin.readline().strip()

def main():
    n = int(input())
    s = list(input())
    al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    l = len(s)
    for i in range(l):
        for k in range(26):
            if s[i] == al[k]:
                if k + n > 25:
                    s[i] = al[k+n-26]
                    print(s[i], end="")
                else:
                    s[i] = al[k+n]
                    print(s[i], end="")
                break
    
    
main()

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

for char in S:
    x = ord(char) + N
    if x > 90:
        x = 64 + x % 90
    ans += chr(x)

print(ans)

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

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n = gete(int)
    s = gete()

    def shift(c, k):
        ret = ord(c) + k
        if ret > ord('Z'): ret = ord('A') + ret - ord('Z') - 1
        return chr(ret)

    print("".join([shift(c, n) for c in s]))


if __name__ == "__main__":
    main()

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

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

s = input()
list = [chr(ord('A') + i) for i in range(26)]
kekka = []
for i in range(len(s)):
    result = (list.index(s[i]) + n)%26
    kekka += list[result]

print("".join(kekka))

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

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

for i in range(len(s)):
    
    ans.append(chr((ord(s[i])+n-65)%26+65))

print("".join(ans))

Solution (Python):
N=int(input())
S=input()
alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=''
for i in range(len(S)):
    ans=ans+alphabet[(alphabet.find(S[i])+N)%26]

print(ans)

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

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

Solution (Python):

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

Solution (Python):
N = int(input())
S = input()
l = len(S)
ans = ''
for i in S:
    num = ord(i)
    num += N
    if num > 90:
        num = 65 + num % 90 -1
    ans += chr(num)
print(ans)

Solution (Python):

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



ans = ''
for i in s:
  x = ord(i) + n
  if x > 90:
    x = 65 + x % 90 -1
  ans += chr(x)

print(ans)

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

Solution (Python):
n = int(input())
s = input()
S = ''
for i in s:
  m = n % 26
  ascii_n = ( ord(i) + m)
  if ascii_n > 90:
    ascii_n -= 26
  S+=(chr(ascii_n))
print(S)

Solution (Python):
ordA = ord('A')

N = int(input())
Ss = input().rstrip()

anss = ''
for S in Ss:
    S = ord(S) - ordA
    anss += chr(ordA + (S+N)%26)

print(anss)

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

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

Solution (Python):
n = int(input())
s = str(input())
apple = "ZABCDEFGHIJKLMNOPQRSTUVWXY"
orange = dict()
cat = dict()
snow = []
for i, j in zip(range(26), apple):
    orange[i] = j
    cat[j] = i

for i in s:
    num = cat[i]
    dog = (num + n) % 26
    snow.append(orange[dog])
print("".join(snow))

Solution (Python):
N = int(input().rstrip())
S = input().rstrip()
ans = list(S)
for i in range(len(S)):
    ans[i] = chr(65+(ord(S[i])+N)%65%26)
print(''.join(ans))

Solution (Python):
n=int(input())
m=input()
alf=["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 m:
    for j in alf:
        if i==j:
            ans=ans+alf[alf.index(j)+n]
            break

print(ans)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def main():
    n = ri()
    s = input()
    ns = ""
    for c in s:
        ns += alp[(ord(c)-ord('A')+n)%26]
    print(ns)


if __name__ == '__main__':
    main()

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

ANS = ''
for s in S:
    if ord(s) + n <= ord('Z'):
        ANS += chr(ord(s) + n)
    else:
        ANS += chr(ord(s) + n -26)
print(ANS)

Solution (Python):
from collections import defaultdict, deque
import sys

INF = float('inf')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = I()
s = S()
ans = ''
for c in s:
    if ord(c) + n > ord('Z'):
        ans += chr((ord(c) + n) - ord('Z') + ord('A') - 1)
    else:
        ans += chr(ord(c) + n)
print(ans)

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

lis = list()
for i in range(len(S)):
    if (ord(S[i]) + N) > 90:
        lis.append(chr(ord(S[i]) +N - 26))
    else:
        lis.append(chr(ord(S[i]) + N))

ans =""

for x in lis:
    ans += x

print(ans)

Solution (Python):
import string

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

lis = string.ascii_uppercase*2

ans =""
for i in s:
    tmp = lis.index(i) + n
    ans += lis[tmp]
    
print(ans)

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

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for a in s:
  idx = alphabet.index(a) + n
  print(alphabet[idx], end='')

Solution (Python):
n = int(input().rstrip())
cl = [ord(c) for c in input().rstrip().rstrip()]
for i in range(len(cl)):
	v = cl[i] + n
	cl[i] = v if v <= ord('Z') else (ord('A') + v - ord('Z') - 1)

r = ''
for i in range(len(cl)):
	r += chr(cl[i])

print(r)

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

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

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

ord_S = list(map(ord, S))

ord_shift_S = [(x+N - ord('A'))%26 + ord('A') for x in ord_S]
chr_shift_S = list(map(chr, ord_shift_S))

print(*chr_shift_S, sep='')

Solution (Python):
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
n = int(input())
print("".join([l[l.index(x)+n] for x in input()]))

Solution (Python):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def rot(s, N):
    p = ord(s) - ord('A')
    p = (p + N) % 26
    return chr(ord('A') + p)


def main():
    N = int(readline())
    S = readline().rstrip().decode()
    print(''.join([rot(s, N) for s in S]))


if __name__ == '__main__':
    main()

Solution (Python):
k = int(raw_input())
A = 'A'
print ''.join([chr((ord(l) -ord(A) + k) % 26 + ord(A))  for l in raw_input()])

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N = int(input())
    S = list(input())

    ai = ord('A')
    zi = ord('Z')
    for i in range(len(S)):
        code = ord(S[i]) + N
        if code > zi:
            code -= 26
        S[i] = chr(code)

    print(''.join(S))


if __name__ == '__main__':
    solve()

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

m= len(s)
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

new=''


for i in range(m):
    num = alph.index(s[i])
    new += alph[num+n]

print(new)

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

Solution (Python):
N = int(input())
S = input()
ans = ""
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)):
    index = l.index(S[i])
    if index + N >= 26:
        ans += l[index+N-26]
    else:
        ans += l[index+N]
print(ans)

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):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    s = input()[:-1].decode()

    ans = ''

    for si in s:
        ans += chr(ord('A') + (ord(si) - ord('A') + n) % 26)

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
import string
a = string.ascii_uppercase*2
N = int(input())
S = input()
b = []
for i in S:
    b.append(a[a.index(i)+N])
print("".join(b))

Solution (Python):
import string

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

ans = ''
for i in range(len(s)):
  ans += string.ascii_uppercase[(string.ascii_uppercase.index(s[i]) + n)%26]

print(ans)

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

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

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

    print(answer)


if __name__ == '__main__':
    rot_n()

Solution (Python):
N = int(input())
S = input()
L = len(S)
a = 'a'
for i in range(L):
    O = ord(S[i]) + N
    if O > 90:
        O = (O-90)+64
    else:
        pass
    ans = chr(O)
    a = a+ans

print(a[1:])

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

Solution (Python):
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
n = int(input())
S = list(input())
for i in range(len(S)):
    S[i] = alpha[alpha.index(S[i])+n]
print("".join(S))

Solution (Python):
n = int(input())
s = input()
b = ""
ab = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(int(len(s))):
    for j in range(int(len(ab))):
        if (s[i] == ab[j]):
            if (int(j+n) > 25):
                b += ab[j+n-26]
                break
            else:
                b += ab[j+n]
                break

print(b)

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

ans = ''
for c in s:
    i = ord(c) - ord('A')
    i = (i + n) % 26
    ans += chr(i + ord('A'))
print(ans)

Solution (Python):
n=int(input())
s=input()
 
t=[]
for i in range(len(s)):
  num=ord(s[i])+n
  if num>90:
    num-=26
  t.append(chr(num))

print("".join(t))

Solution (Python):
N=int(input())
S=list(input())
result=''
for i in range(len(S)):
  tmp=ord(S[i])+N
  if tmp<=90:
    result+=chr(tmp)
  else:
    result+=chr(tmp%91+65)
print(result)

Solution (Python):
i=int(input());s=input()
for a in s:
  ind = ord(a)+(i%26)
  if ind > 90:
    ind -= 26 
  print(chr(ind), end='', sep='')

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

def rot(s):
    return chr((ord(s) - 65 + N) % 26 + 65)

print("".join([rot(s) for s in S]))

Solution (Python):
import string
n = int(input())
s = input()
alpha_table=string.ascii_uppercase
ans=[]
for c in s:
    idx=alpha_table.index(c)
    ans.append(alpha_table[(idx+n)%26])
    
print(''.join(ans))

Solution (Python):
import math
import re
import copy

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

Solution (Python):
n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alpha_c = [""]*26
for i in range(26):
    a = (i + n) % 26
    alpha_c[i] = alpha[a]
word = ""
for i in range(len(s)):
    for j in range(26):
        if alpha[j]==s[i]:
            word += alpha_c[j]
print(word)

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

for i in S:
	if(ord(i)+N<=90):
		print(chr(ord(i)+N),end='')
	else:
		c = (N+ord(i))-90+64
		print(chr(c),end='')

print()

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

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

print(T)

Solution (Python):
n = int(input())
s = str(input())
ans = ''
for i in s:
    t = (int(ord(i) + n - 64)) % 26
    if t == 0:
        ans += 'Z'
    else:
        ans += chr(t + 64)
print(ans)

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

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

Solution (Python):
N=int(input())
S=input()
temp=[]
for x in range(2):
    for i in range(65,91):
        temp.append(chr(i))

ans=""
for i in range(len(S)):
    ans+=temp[ord(S[i])-65+N]
print(ans)

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

Solution (Python):
n = int(input())
s = input()
l = [chr(i) for i in range(65, 65+26)]
l.extend(l)
ans = ""
for i in s:
    a = l.index(i)
    ans += l[a+n]
print(ans)

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

Solution (Python):
n = int(input())
s = input()
l = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') * 2
a = ''

for i in s:
    a += l[l.index(i) + n]

print(a)

Solution (Python):
n=int(input())
s=list(input())
a=[chr(i) for i in range(65,65+26)]

for i in range(len(s)):
  for j in range(len(a)):
    if s[i]==a[j]:
      if j+n<26:
        s[i]=a[j+n]
      else:
        s[i]=a[j+n-26]
      break

print(''.join(s))

Solution (Python):
n=int(input())
s=input()
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"]

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

print("".join(out))

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

alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
new = []
for i in range(len(S)):
    idx = alphabet.index(S[i])
    character = alphabet[(idx + N) % 26]
    new.append(character)

print("".join(new))

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

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

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


KEY = n
plain = ""
for char in list(ENC):
    ASCII = ord(char)
    num = ASCII - 65
    num = (num + KEY) % 26
    ASCII = num + 65
    plain += chr(ASCII)

print(plain)

Solution (Python):
N=int(input())
S=input()
answer=""
for letter in S:
    answer+=chr((ord(letter)-ord("A")+N)%26+ord("A"))
print(answer)

Solution (Python):



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

tmp = ""

for s in S:
    unicode_point = ord(s) + N

    if unicode_point > 90:
        unicode_point = 64 + (unicode_point - 90)

    tmp += chr(unicode_point)

print(tmp)

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

alf = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

ans = []
for s in list(s):
  ans.append( alf[ alf.index(s) + n ] )

print("".join(ans))

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

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    S = input().rstrip()
    ans = []
    for c in S:
        code = ord(c) + N
        if code > 90:code = 65 + (code-91)
        ans.append(chr(code))
    print("".join(ans))
if __name__ == "__main__":
    main()

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

al = [chr(ord('A') + i) for i in range(26)]
ans = ''

for ch in s:
    idx = (ord(ch)+n-ord('A'))%26
    ans += al[idx]
    
print(ans)

Solution (Python):
n = int(input())
s = list(input())
alp = []
for i in range(26):
    alp.append(chr(ord("A") + i))
for i in range(len(s)):
    x = alp.index(s[i])
    x = (x + n) % 26
    print(alp[x],end="")

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

Solution (Python):
o=int(input())
s=list(input())
r=""
for ii in s:
  a=ord(ii)+o
  if a>ord("Z"):
    a+=ord("A")-1-ord("Z")
  r=r+chr(a)
print(r)

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

ans = ""



for i in s:
    temp = ord(i)
    
    if int(ord(i)) + n > 90:
        temp = int(temp) -90 + 64
        temp = chr(temp+n)
        ans = ans + temp
    else:
        temp = chr(temp+n)
        ans = ans + temp


print(ans)

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

result = ''
for i in range(0,len(S)):
  num = ord(S[i])
  if num + N > 90:
    p = num + N - 90 + 64
  else:
    p = num + N
  new = chr(p)
  result += new

print(result)

Solution (Python):
N = int(input())
words  = input()
lis = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
result = [""]*len(words)
for i in range(len(words)):
    k = lis.find(words[i])
    if k+N >=len(lis):
        tmp = k+N -len(lis)
    else:
        tmp = k+N
    result[i] = lis[tmp]
print("".join(result))

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

ans = ''
for c in s:
    rot = ord(c) + n
    if rot > 90:
        rot -= 26

    ans = ans + chr(rot)

print(ans)

Solution (Python):


n = int(input())
s = list(str(input()))


base_a = ord("A")

for i in range(len(s)):
    index = (ord(s[i])-base_a+n) % 26 + base_a
    s[i] = chr(index)

for i in range(len(s)):
    print(s[i], end="")
print()

Solution (Python):


n = int(input())
s = list(str(input()))


base_a = ord("A")

for i in range(len(s)):
    index = (ord(s[i])-base_a+n) % 26 + base_a
    s[i] = chr(index)

for i in range(len(s)):
    print(s[i], end="")
print()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits, ascii_letters
from bisect import bisect, bisect_left
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)))
import numpy as np
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()
ans = [ascii_uppercase[(ascii_uppercase.index(S[i])+N)%26] for i in range(len(S))]

print(*ans, sep="")

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

ans = ""
for i in s:
    a = ord(i) + n
    if a > 90:
        ans += chr(64 + (a - 90))
    else:
        ans += chr(a)
print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits, ascii_letters
from bisect import bisect, bisect_left
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)))
import numpy as np
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()
ans = []

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

print(*ans, sep="")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, 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 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)))
import numpy as np
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()

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

print(*A, sep="")