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()
string = ""

for i in range(len(s)):
    if ord(s[i]) + n <= ord("Z"):
        string += chr(ord(s[i]) + n)
    else:
        string += chr(ord(s[i]) + n - 26)

print(string)

Solution (Python):

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

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

lis=[]
for i in range(len(s)):
    ind=al.index(s[i])
    lis.append(al_n[ind+n])
print("".join(lis))

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

print(''.join(ans))

Solution (Python):
n=int(input())
s=input()
ans=[]
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)):
    if list.index(s[i])+n <= 25:
        ans.append(list[list.index(s[i])+n])
    else:
        ans.append(list[list.index(s[i])+n-26])
print(*ans,sep='')

Solution (Python):
n = int(input())
s = input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in s:
    ans += l[l.index(i)+n]

print(ans)

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

for i in s:
    num = ord(i) + n;
    
    num = num - ord("A")
    num = num % 26
    ans.append(chr(num  + ord("A")))
    
new = ""
for j in ans:
    new += j

print(new.upper())

Solution (Python):
import sys, math
from pprint import pprint
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
S = rs()

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

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

Solution (Python):


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

k = 0
ans = ""

for i in S:
    j = ord(i) + N
    while j > 90:
        j -= 26
    ans += chr(j)

print(ans)

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

a = ''
for i in S:
    if ord('Z') < (ord(i) + N):
        a+=chr(ord('A') + ((ord(i) + N) - ord('Z') - 1))
    else:
        a+=chr(ord(i) + N)

print(a)

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

for i in S:
    print(al[(al.index(i)+N) % 26], end="")

Solution (Python):


def main():
    N, S = map(str, open(0).read().split())
    N = int(N)

    S_rep = []
    for i in range(0, len(S)):
        n = ord(list(S)[i])
        if (n + N < 91):
            S_rep.append(chr(n + N))
        else:
            S_rep.append(chr(n + N + 6))
    
    S_rep = ''.join(S_rep)
    print(S_rep.upper())



main()

Solution (Python):
n = int(input())
s = input()
ans = ""
for i in s:
    s_asc = ord(i)
    dum = s_asc + n
    if dum > ord("Z"):
        dum = dum - 26
    ans = ans + chr(dum)
print(ans)

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

def order(i, n):
    return chr(65 + (ord(i) - 65 + n) % 26)

for i in range(len(s)):
    s[i] = order(s[i], n)
print(''.join(s))

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

Solution (Python):
n = int(input())
import string
al = list(map(str, string.ascii_uppercase))
for j in range(n):
    al.append(al[j])
x = ""

li=list(input())
for i in range(len(li)):
    x += al[al.index(li[i]) + n]
print(x)

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

Solution (Python):
n=int(input())
s=input()
l=len(s)
alp="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=str()
for i in range(l):
	ans += alp[(alp.index(s[i])+n)%26]
print(ans)

Solution (Python):
n=int(input())
s=input()
l=len(s)
alp="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=str()
for i in range(l):
	ans += alp[alp.index(s[i])+n]
print(ans)

Solution (Python):
N = int(input())
S = [c for c in input()]

for idx, alphabet in enumerate(S):
  code = ord(alphabet) + N
  if code > ord('Z'):
    code = ord('A') + (code - ord('Z') - 1)
  
  S[idx] = chr(code)

print(''.join(S))

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

Solution (Python):

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','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())
ls = list(input())

countlist = [None for _ in range(len(ls))]
for i in range(len(ls)):
  for j in range(26):
    if ls[i] == alphabet[j]:
      countlist[i] = j

for i in range(len(countlist)):
  countlist[i] += N

anslist = [None for _ in range(len(ls))]
for i in range(len(anslist)):
  anslist[i] = alphabet[countlist[i]]

ans = ''.join(anslist)
print(ans)

Solution (Python):
n=int(input())
s=input()
l=len(s)
ans=[]
for i in range(l):
    if ord(s[i])+n<=90:
        ans.append(chr(ord(s[i])+n))
    else:
        ans.append(chr(ord(s[i])+n-26))
print(''.join(ans))

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for c in chars:
    pos = alphabet.find(c)
    ans += alphabet[(pos + n) % 26]

print(ans)

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

for i in range(len(S)):
  if int(ord(S[i]))+N >= 91:
    ans=chr(int(ord(S[i]))+N-26)
  else:
    ans=chr(int(ord(S[i]))+N)
  L.append(ans)
print(''.join(L))

Solution (Python):
n=int(input())
s=input()
string=''
for ss in s:
  index=ord(ss)+n
  if index>ord('Z'):
    index-=26
  string+=chr(index)
print(string)

Solution (Python):
import string
alphabet = string.ascii_uppercase

n = int(input())
s = list(input())
for i in range(len(s)):
    pos = alphabet.index(s[i]) + n
    if pos > 25:
        pos -= 26
    s[i] = alphabet[pos]
print("".join(s))

Solution (Python):
a = int(input())
b = input()
def rot_n(s, n):
    answer = ''
    for letter in s:
        answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26)

    return answer
print(rot_n(b, a))

Solution (Python):
import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline().strip()
t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
txt = ''
for i in s:
  txt += t[t.index(i) + n]
print(txt)

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

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

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

for s in S:
  if N <= ord("Z") - ord(s):
    res += chr(ord(s) + N)
  else:
    res += chr(ord("A") + (N - 1 - (ord("Z") - ord(s))))
print("".join(res))

Solution (Python):
n = int(input())
moji = str(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"]
lst = list(moji)
for i in range(len(lst)):
  num = alphabet.index(lst[i])
  if num + n >= 26:
    lst[i] = alphabet[num+n-26]
  else:
    lst[i] = alphabet[num+n]
ans = ""
for j in range(len(lst)):
  ans += lst[j]
print(ans)

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

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

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

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

Solution (Python):
N = int(input())
S = input()
l = len(S)
word = ["a"]*l
for i in range(l):
  if ord(S[i]) + N <= 90:
    word[i] = chr(ord(S[i])+N)
  else:
    word[i] = chr(ord(S[i])+N-26)
print("".join(word))

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for c in chars:
    pos = alphabet.find(c)
    ans += alphabet[(pos + n) % 26]

print(ans)

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

for i in range(0,len(S)):
    tem = ord(S[i]) + N
    if tem > 90:
        tem = (tem % 90) + 64
    S[i] = chr(tem)

print("".join(S))

Solution (Python):
n = int(input())
s = str(input())
c = len(s)
t = ''
for i in range(0,c):
  if (ord(s[i])+n)>90:
    a = ord(s[i])+n-26
  else:
    a = ord(s[i])+n
  t += chr(a)
print(t)

Solution (Python):
n = int(input())
S = input()
moji = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = []
for s in S:
    for m in moji:
        if m == s:
            ans.append(moji[(moji.index(m) + n) % len(moji)])
ans = "".join(ans)
print(ans)

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

Solution (Python):
N = int(input())
S = str(input())
Ans = []
for i in range(len(S)):
  if ord(S[i]) + N <= 90:
    Ans.append(chr(ord(S[i]) + N))
  else:
    Ans.append(chr(ord(S[i]) + N - 90 + 64))
print(''.join(Ans))

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

for j in range(len(s)):
    for i in range(26):
        if s[j]==l[i]:
           ans += l[i+n] 
        else:
            pass

print(ans)

Solution (Python):
n = int(input())
s = input()
ans = ''
for i in range(len(s)):
    if ord(s[i])+n >= 91:
        ord_c = ord(s[i])+n - 26
    else:
        ord_c = ord(s[i])+n
    chr_c = chr(ord_c)
    ans += chr_c

print(ans)

Solution (Python):

n = int(input())
s = input()
ans = ""
num = 0

for i in range(len(s)):
    num = ord(s[i])+n
    if num > 90:
        num = (num % 90) + 64
    ans += chr(num)
print(ans)

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

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

Solution (Python):

def resolve():
    N=int(input())
    S=input()
    ans=""
    for i in S:
        t=(ord(i)+N)
        if t>=ord("["):
            t-=ord("Z")-ord("A")+1
            
        ans+=chr(t)
    print(ans)


resolve()

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

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 


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

ans = ''
for x in s:
    i = ord(x) + n
    if i > ord('Z'): i -= (ord('Z') - ord('A') + 1)
    ans += chr(i)
print(ans)

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

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

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

print("".join(s))

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

Solution (Python):
shift_num = int(input())
string = list(input())

for i, char in enumerate(string):
    current_ord = (ord(char)+shift_num-ord('A')) % 26
    new = chr(current_ord + ord('A'))
    string[i] = new
    
print(''.join(string))

Solution (Python):
def q2():
    """B - ROT N"""
    N = int(input())
    S = list(input())
    
    for s in S:
        tmp = ord(s) + N
        if tmp > ord('Z'):
            tmp -= ord('Z') - ord('A') + 1
            
        print(chr(tmp), end='')
        
    print('')


if __name__ == '__main__':
    q2()

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

Solution (Python):
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(input())
s = input()
ans = []
for i in range(len(s)):
    for j in range(len(alp)):
        if s[i] == alp[j]:
            if j + n <= 25:
                ans.append(alp[j+n])
            else:
                ans.append(alp[j+n-26])
ans = "".join(ans)
print(ans)

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

Solution (Python):
n = int(input())
s = input()
l = [chr(i) for i in range(65,91)]
ss=len(l)-1
ans=""
for si in s:
  i=l.index(si)
  if i+n>ss:
    ans+=l[abs(i+n-ss)-1]
  else:
    ans+=l[i+n]
print(ans)

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

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

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']
y = [0]*len(s)
x = ""

for i in range(len(s)):
    for j in range(26):
        if s[i] == a[j]:
            d = (j+n)%26
            y[i] = a[d]

for k in range(len(s)):
    x = x + y[k]

print(x)

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

Solution (Python):
n=int(input())
s=list(input())
l=[chr(ord('A') + i) for i in range(26)]
x=[]
for i in range(int(len(s))):
  if l.index(s[i])+n>25:
    x.append(l[l.index(s[i])+n-26])
  else:
    x.append(l[l.index(s[i])+n])
print("".join(x))

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

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

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

L = list(S)
l= len(S)
for _ in range(N):
    for i in range(l):
        if L[i] == "Z":
            L[i] = "A"
        else:
            L[i] = (chr(ord(L[i]) + 1))
ans = "".join(L)
print(ans)

Solution (Python):
n = int(input())
s = input()
res = ''
abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
  res += abc[abc.index(s[i]) + n]
print(res)

Solution (Python):

n = int(input())
s = input()
ss = ""
A = str("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in range(len(s)):
    A_index = A.find(s[i])
    new_index = A_index + n
    ss = ss + str(A[new_index % 26])
print(str(ss))

Solution (Python):
l = []
for c in range(65, 91): 
        l.append(c)
x = int(input())
n = input()
for i in range(len(n)):
    character = ord(n[i])
    if character+x>90:
        print(chr(l[(character+x)%90-1]),end='')
    else:
        print(chr(character+x),end='')

Solution (Python):


alphabet_1 = [chr(ord('A') + i) for i in range(26)]
alphabet_2 = [chr(ord('A') + i) for i in range(26)]

alphabet = alphabet_1 + alphabet_2

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

count = len(S)

ans = " "
for i in range(count):
  number = int(alphabet.index(S[i]))
  ans = ans + alphabet[number+N]

print(ans)

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

C = list(S)
cA = ord('A')  
n = ord('Z') - ord('A') + 1  
ans = map(lambda c : chr(cA + (ord(c) + N - cA) % n), C)
print(''.join(ans))

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

for s in string_s:
    index_s = alphabet.index(s)
    if index_s + n >= 26:
        ans_s = ans_s + alphabet[(index_s + n) - 26]
    else:
        ans_s = ans_s + alphabet[index_s + n]
print(ans_s)

Solution (Python):
A=[x for x in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
N=int(input())
S=input()
s=[x for x in S]
ans=""
for i in range(len(S)):
  if A.index(S[i])+N<=25:
    ans+=A[A.index(S[i])+N]
  else:
    ans+=A[A.index(S[i])+N-26]
print(ans)

Solution (Python):

N = int(input())
S = input()
alphabets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for s in S:
    print(alphabets[(alphabets.index(s) + N) % 26], end = '')

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

S2 = []

for s in S:
    if (ord(s) + N) < 91:
        S2.append(chr(ord(s) + N))
    else:
        S2.append(chr(ord(s) + N - 26))

print(*S2, sep="")

Solution (Python):
import sys
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    N = input(int)
    S = input(str)
    a = ord("A")
    ans = ""
    for s in S:
        ans += chr((ord(s) - a + N) % 26 + a)
    print(ans)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

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

offset = ord("A")

ans = ""
for c in s:
    temp = (ord(c) - offset + n) % 26 + offset
    ans += chr(temp)
print(ans)

Solution (Python):
times = int(input())
a = 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"]
for i in range(len(a)):
  b = alphabet.index(a[i])+times
  if 25 < b:
    b = b-26
  a[i]=alphabet[b]
for i in range(len(a)):
  print(a[i],end="")

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

ALPHABETS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

L = ''

for c in S:
  i = ALPHABETS.index(c)
  L += ALPHABETS[(i + N) % 26]
  
print(L)

Solution (Python):
n=int(input())
s=input()
letter='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
a=[0]*len(s)
for i in range(len(s)):
  
  u=letter.index(s[i])
  a[i]=letter[int(u)+n]
  
print(''.join(a))

Solution (Python):
n = int(input())
s = input()
S = len(s)
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"]
m = "ABCDEFGHIJKLMNOQPRSTUVWXYZ"
old_word = 0
new_word = 0
ans = []




for i in range(S):
    old_word = l.index(s[i])
    
    new_word = old_word + n
    
    if new_word > 25:
        new_word = new_word - 26
    ans.append(l[new_word])



print("".join(ans))

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

ans_list = []

for s in S:
    new_ord = ord(s) + N
    if new_ord <= 90:
        ans_list.append(chr(new_ord))
    else:
        ans_list.append(chr(new_ord - 26))

ans = ''.join(ans_list)

print(ans)

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

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

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())
S=input()
st=""
for s in S:
    index=alpha.index(s)
    if N+index>=len(alpha)-1:
        st = st + alpha[N + index-len(alpha)]
    else:

        st=st+alpha[N+index]
print(st)

Solution (Python):
N = int(input())
S = [i for i in 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']
ans=''
for c in S:
    cnt = alpha.index(c)+N
    if cnt > 25:
        cnt=cnt-26
    c = alpha[cnt]
    ans+=c
print(ans)

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

s = input()

ans = []

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

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

for i in range(len(s)):
    ans += alph[(alph.find(s[i]) + 1 + n) % len(alph) - 1]

print(ans)

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

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

	ans += chr(num)

print(ans)

Solution (Python):
N = int(input())
S = input()
ans = []
for s in S:
  new_s = ord(s)+N
  if new_s >= 91:
    new_s -= 26
  ans.append(chr(new_s))
print(''.join(ans))

Solution (Python):
N=int(input())
alphabets='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
S=input()
def convert(s): 
  
    
    new = "" 
  
    
    for x in s: 
        new += x  
  
    
    return new 
ans=[]
for i in range(0,len(S)):
  ans.append(S[i])
ans2=[]
for i in ans:
  for j in range(0,26):
    if alphabets[j]==i:
      ans2.append(alphabets[(j+N)%26])
ans=convert(ans2)
print(ans)

Solution (Python):
n = int(input())
s = input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in s:
    ans += l[l.index(i)+n]
print(ans)

Solution (Python):
icase=0
if icase==0:
    n=int(input())
    s=list(input())
    t=""
    for ss in s:
        i=(ord(ss)+n-65)%26+65
        t=t+chr(i)
    print(t)

Solution (Python):
n = int(input())
s = input()
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
di = {}
d = {}
for i in range(len(a)):
    di[i] = a[i]
    d[a[i]] = i
ss = ''
for i in s:
    k = d[i] + n
    k %= 26
    ss += di[k]
print(ss)

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 = list(input())

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

print(*s, sep='')

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

Solution (Python):
n = int(input())
s = input()
s = list(s)
a = ''
for i in range(len(s)):
    if 'A' <= chr(ord(s[i]) + n) and chr(ord(s[i]) + n) <= 'Z':
        s[i] = chr(ord(s[i]) + n)
    else:
        s[i] = chr(ord('A') + (ord(s[i]) + n) % (ord('Z') + 1))
    a += s[i]
print(a)

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

Solution (Python):
class RotN:
    def __init__(self):
        self.alphabet = [a for a in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

    def calculate(self, N, S):
        result_list =[]
        for s in S:
            num = self.alphabet.index(s)
            
            if num + N > 25:
                tmp = 25 - (num + N)
                result_list.append(self.alphabet[abs(tmp)-1])
            
            else:
                tmp = num + N
                result_list.append(self.alphabet[tmp]) 
        return result_list

if __name__ == '__main__':
    N = int(input())
    S = [s for s in input()]
    rn = RotN()
    result_list = rn.calculate(N, S)
    result = ''
    for x in result_list:
        result += x
    print(result)

Solution (Python):
def main():
    N = int(input())
    S = list(input())
    alpha = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    for i in range(len(S)):
        idx = alpha.index(S[i])
        idx += N
        if idx > len(alpha) - 1:
            idx -= len(alpha)
        S[i] = alpha[idx]
    print("".join(S))
main()

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

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

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

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

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

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

new_s = []
for c in S:
    new_s.append(chr((ord(c) - ord("A") + N) % 26 + ord("A")))

print("".join(new_s))

Solution (Python):
def rot_n(s, n):
    tmp = ord(s) + n
    if tmp > 90:
        tmp -= 26
    return chr(tmp)
N = int(input())
S = input()
for i in range(len(S)):
    print(rot_n(S[i], N), end='')
print('')

Solution (Python):
A = int(input())
listB = list(input())
f_l = ""
listA = {"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}
listC = {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 listB:
    B = listA[i]
    B += A
    if B > 26:
        B -= 26
    f_l += listC[B]
print(f_l)

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

Solution (Python):
N = int(input())
string = str(input())
res = ''
for i in range(len(string)):
	temp = ''
	
	x = ord(string[i])-ord('A')
	x = (x+N)%26
	temp = chr(x+ord('A'))
	res += temp
print(''.join(res))

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  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']
  B = A[N:] + A[:N]
  D = {}
  for a, b in zip(A,B):
    D[a] = b
  ans = ''
  for i in range(len(S)):
    ans += D[S[i]]
  print(ans)
  
  
if __name__ == '__main__':
  main()

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


s = input()

ans = ''
for i in s:
    t = ord(i) + n
    if t > ord('Z'):
        t = ord('A') + (t - ord('Z')) - 1
    ans += chr(t)
print(ans)

Solution (Python):
from functools import reduce, partial
n = int(input())
s = input()

def f(n, c):
  a = ord('A')
  x = a + (ord(c) - a + n) % 26
  return chr(x)

f = partial(f, n)

s = reduce(lambda x,y: x + y, map(f, s))
print(s)

Solution (Python):
N = int(input())
S = input()
s = list(S)
alp = ["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"]
for c in s:
    print(alp[alp.index(c) + N], end="")

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

Solution (Python):
import math
import fractions
import sys
import itertools
import numpy as np

def input1():
	return int(input())


def input2():
	return map(int,input().split())


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


N=input1()
S=list(str(input()))
base=ord("A")
for i in range(len(S)):
	S[i]=chr(base+(ord(S[i])-ord("A")+N)%26)
print("".join(S))

Solution (Python):



plus = int(input())
a = input()

answer = ""
for i in a:
    answer += chr(ord("A") + (ord(i) + plus - ord("A")) % 26)
print(answer)

Solution (Python):
N = int(input())
S = input()
ans = ''
for i in range(len(S)):
  temp = ord(S[i]) - ord('A') + N
  ans += chr(ord("A") + temp%26 )
print(ans)

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

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

for s in range(len(S)):
    ans+=W[W.index(S[s])+N]
print(ans)

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


def incre(n, i):
    if n > 26:
        n - 26 * (n // 26)

    d = ord(i) + n
    if d > 90:
        d -= 26

    return chr(d)


for i in S:
    text += incre(N, i)

print(text)

Solution (Python):
N=int(input())
S=str(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']
d=[]
for i in range(len(S)):
  a=ALF.index(S[i])
  if N+a > 25:
    d.append(ALF[N+a-26])
  else:
    d.append(ALF[N+a])

print("".join(d))

Solution (Python):
def main():
    n = int(input())
    s = 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"]
    res = ""
    for i in s:
        idx = alphabet.index(i)
        target_idx = idx + n
        if target_idx > 25:
            target_idx -= 26
        res += alphabet[target_idx]
    print(res)
if __name__ == "__main__":
    main()

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

ans = []

for i in S:
    ord_s = ord(i)
    if ord_s + N > 90:
        ans.append(chr(65 + ((ord_s + N)) - 91))
    else:
        ans.append(chr(ord_s + N))


print(''.join(ans))

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

l=len(a)

for i in range(l):
  a[i]=a[i]+n
  if a[i]>90:
    a[i]=a[i]-26
a=[chr(c) for c in a]

print("".join(a))

Solution (Python):

import sys
import numpy as np


def solve(N: int, S: str):
    ans = []
    for c in list(S):
        o = ord(c)+N
        o -= 26 if o>90 else 0
        ans.append(chr(o))

    print("".join(ans))
    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()

Solution (Python):
def main():
    n=int(input())
    s=input()
    sum=''
    model='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
    m=list(model)
    for i in range(len(s)):
        now=m.index(s[i])
        sum=sum+m[now+n]
    print(sum)


if __name__=='__main__':
    main()