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):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    youbi = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    S = input()
    S=S[:-1]
    print(7-youbi.index(S))

    return




def B():
    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']
    N = II()
    S = input()
    S=S[:-1]
    ans='a'
    for i in S:
        x=abc.index(i)+N
        if x>25:
            x=x-26
        ans+=abc[x]
    ans=ans[1:]
    print(ans)
    return




def C():
    N = II()
    x = [0]*N
    y = [0]*N
    for i in range(N):
        x[i], y[i] = LI()
    ans = 0
    for j in range(N-1):
        for k in range(j+1, N):
            len = sqrt(((x[j]-x[k])*(x[j]-x[k]))+((y[j]-y[k])*(y[j]-y[k])))
            ans += len
    ans = ans*2/N
    print(ans)

    return




def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return




def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    N = len(S)

    pass



if __name__ == '__main__':
    B()

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

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

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

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

int_ = list(map(lambda x: int(hex(ord(x)),16), S))
incre_ = list(map(lambda x: x+N, int_))
incre_ = [x if x <= 90 else x - 26 for x in incre_]
str_ = list(map(lambda x: chr(x), incre_))
print(''.join(str_))

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
aa = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

res = ''

for i in range(len(s)):
    b = a.find(s[i])
    res += aa[b + n]

print(res)

Solution (Python):
num = int(input())
list = input()
p = ["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"]
l = []
o = ""
for i in range(0,len(list)):
  for t in range(0,26):
    if list[i] == p[t]:
      u = t+num
      if t+num>=26:
        u = (t+num)%26
      l.append(u)

for s in range(0,len(list)):
  o += p[l[s]]
  
print(o)

Solution (Python):
def _rot13(c,N):
    if 'A' <= c and c <= 'Z':
        
        return chr((ord(c) - ord('A') + N) % 26 + ord('A'))

    if 'a' <= c and c <= 'z':
        
        return chr((ord(c) - ord('a') + N) % 26 + ord('a'))

    
    return c


def rot13(s,N):
    
    g = (_rot13(c,N) for c in s)
    
    return ''.join(g)


def main():
    N = int(input())
    s = input()
    print(rot13(s,N))


if __name__ == '__main__':
    main()

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

Solution (Python):
n=int(input())
s=input()
s_li=list(s)
li=[chr(ord('A')+i) for i in range(26)]*2
ans_li=[]
for i in range(len(s_li)):
    a=li.index(s_li[i])
    ans_li.append(li[a+n])
ans=''
for i in ans_li:
    ans+=i
print(ans)

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']*2
anslist=[alpha[ord(i)-65+N] for i in S]
print(''.join(anslist))

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

for i in s:
  if ord(i) + n <= 90:
    print(chr(ord(i) + n), end="")
  else:
    print(chr(ord(i) + n -26), end="")

Solution (Python):
N=int(input())
S=input()
S=list(S)
p=[]
A=list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in S:
  for j,a in enumerate(A):
    if i==a:
      p.append(A[j+N])
      break
print(''.join(list(p)))

Solution (Python):
"""
ROT N
https://atcoder.jp/contests/abc146/tasks/abc146_b
"""

import sys
input = sys.stdin.readline

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

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

ans = []
for s in S:
    for i, char in enumerate(alphabet):
        if s == char:
            ans.append(i)
            break

for item in ans:
    print(alphabet[item + N], end="")
print()

Solution (Python):
N = int(input())
S = list(input())
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']
for i in range(len(S)):
    for j in range(len(alp)):
        if alp[j] == S[i]:
            ans = int((j + N) % len(alp))
            S[i] = alp[ans]
            break
        else:
            continue
print(''.join(S))

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

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

ans = []
for w in s:
    num = (alpha2num(w) + n)
    if (num % 27) == 0:
        num = 1
    elif num // 27 > 0:
        num = (num % 27) + 1
    else:
        num = (num % 27)
    tmp = num2alpha(num)
    ans.append(tmp)
    
print("".join(ans))

Solution (Python):
AZ_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"]
N = int(input())
S = list(input())
for s in S:
    new_index = AZ_list.index(s) + N
    if new_index > 25:
        new_index -= 26
    print(AZ_list[new_index], end='')

Solution (Python):
n = int(input())
s = input()
  
ans =""
for c in s:
    if ('A' <= c and c <= 'Z'):
        ans += (chr((ord(c) - ord('A') + n) % 26 + ord('A')))
print(ans)

Solution (Python):
N = int(input())
S = str(input())
 
res = list()
 
strings = [chr(i) for i in range(65, 65+26)]
for s in S:
  ind = strings.index(s) + N
  res.append(strings[ind % len(strings)])
  
print(''.join(map(str, res)))

Solution (Python):
from copy import copy
N = int(input())
S = input()

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = copy(S)



for i in range(len(S)):
    ans = ans[:i] + alpha[alpha.index(S[i]) + N] + ans[i+1:]

print(ans)

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

ans=''
for i in range(len(s)):
    a=l.index(s[i])
    if a+n<=25:
        ans+=l[a+n]
    else:
        ans+=l[a+n-26]
print(ans)

Solution (Python):
n = int(input())
s = input()
o = int()
s = list(s)
for i, youso in enumerate(s):
    o = ord(youso)
    if o+n>90:
        s[i] = chr(64 + n-(90-o))
    else:
        s[i] = chr(o + n)
print("".join(s))

Solution (Python):
n=int(input())
s=input().lower()
ans=''
for char in list(s):
    a=ord(char)
    num=a-97
    num=(num+n)%26
    a=num+97
    ans+=chr(a)
print(ans.upper())

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

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

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

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

print(ret)

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

for i in S:
  tmp = (ord(i)-ord("A") + N)
  if tmp >= 26:
    tmp = tmp %26 
  print(chr(tmp + ord("A")),end='')

Solution (Python):
import string
num = int(input())
S = [i for i in input()]
res = ''
abc_list = [i for i in string.ascii_uppercase]

for i in S:
    new_index = (abc_list.index(i) + num ) % 26
    res += abc_list[new_index]

print(res)

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

Solution (Python):
li = ["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"]
num = int(input())
inputs = input()
char = ""
char_list = list(inputs)
for x in char_list:
    pos = li.index(x)
    pos += num
    while pos >= 26:
        pos -= 26
    char += li[pos]

print(char)

Solution (Python):
N = int(input())
S = list(input())
alps = ['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 S:
  index = alps.index(i) + N
  ans.append(alps[index])
print(''.join(ans))

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

alpha_dict = {}
for i,c in enumerate(range(ord('A'),ord('Z')+1)):
    alpha_dict[i+1] = chr(c)
    
new_s = []
for s in sList:
    key = [k for k, v in alpha_dict.items() if v == s][0]
    key = key + n
    if key > 26:
        key -= 26
    new_s.append(alpha_dict[key])
new_s = "".join(new_s)
print(new_s)

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

X = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
x = {}
for i in range(26):
    x[X[i]] = i
ans = ''
for i in range(len(S)):
    ans += X[(x[S[i]]+N)%26]
print(ans)

Solution (Python):
N = int(input())
S = input()
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
d = {s: t for s, t in zip("ABCDEFGHIJKLMNOPQRSTUVWXYZ", a[N:] + a[:N])}
print("".join(d[s] for s in S))

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

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

print(ret)

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

for k in range(len(s)):
    for l in range(26):
        if s[k] == alf[l]:
            s[k] = alf[l + n]
            break
s = "".join(s)
print(s)

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

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

for i in range(len(S)):
    s = ord(S[i])
    s = s + N
    if s > 90:
        array.append(chr(s - 26))
    else:
        array.append(chr(s))
        
print("".join(array))

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

ans = []
for i in range(ln):
    ind = alph.index(s[i])
    newind = ind + n
    if newind > 25:
        newind = newind - 26
    ans.append(alph[newind])

print("".join(ans))

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

out = ''
for char in s:
    i = ord(char)
    if i+n > 90:
        out += chr(i+n-26)
    else:
        out += chr(i+n)
print(out)

Solution (Python):

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

charc = ['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)):
    Si = S[i]
    ind = charc.index(Si)
    if ind + N <= 25:
        ans.append(charc[ind+N])
    else:
        ind = ind + N - 26
        ans.append(charc[ind])
    
print(''.join(ans))

Solution (Python):



n = int(input())
s = input()
r = 65





lst = []
for c in s:
    new_character = chr((ord(c)-65+n)%26+65)
    lst.append(new_character)

print("".join(lst))

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



W = ["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)):
    ans += W[W.index(s[i])+n]
print(ans)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 



n = int(input())



s = input()

ans = []

x = ord("A")
for i in s:
    c = ord(i) + n
    if c > ord("Z"): c -= 26
    ans.append(chr(c))

print("".join(ans))

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

a = ""
for i in s:
    if ord(i) + n <= 90:
        a += chr(ord(i) + n)

    else:
        a += chr(ord(i) + n - 26)

print(a)

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

al = [chr(i) for i in range(ord('A'), ord('Z')+1)]

newlist = ''

for i in w:
  index = al.index(i)
  new = index + N
  if new > 25:
    new = new - 26
  newlist += al[new]
  

print(newlist)

Solution (Python):
import string

N = int(raw_input())
S = raw_input()

letters = string.ascii_uppercase * 2

print ''.join(letters[letters.index(c) + N] for c in S)

Solution (Python):
N = int(input())
S = input()
A = list(map(lambda x:ord(x)+N,S))
for i in range(len(A)):
    if A[i] > 90:
         A[i] = A[i] - 26
B = list(map(lambda x:chr(x),A))
print("".join(B))

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

ALIST = {
  '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
}

RLIST = {
  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'
}

RESULT = ""
n = 0

for i in range(0, len(S)):
  n = ALIST[S[i]] + N
  if n > 26:
    n -= 26
  RESULT += RLIST[n]

print(RESULT)

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

ans = []
for s in S:
    if ord(s) + N <= 90:
        ans.append(chr(ord(s) + N))
    else:
        ans.append(chr(ord(s) + N - 26))
print("".join(ans))

Solution (Python):

import sys
f = sys.stdin
n = int(f.readline())
s = list(map(ord, list(f.readline())[:-1]))

s = [chr((a - 65 + n) % 26 + 65) for a in s]
s = ''.join(s)

print(s)

Solution (Python):
N=int(input())
print(''.join(map(lambda s:chr((ord(s)-ord('A')+N)%26+ord('A')),input())))

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 S:
    if dic.index(i)+N <= 25:
        index = dic.index(i)+N
    else:
        index = dic.index(i)+N-26
    ans += dic[index]
print(ans)

Solution (Python):
import sys
import string
sys.setrecursionlimit(5 * 10**5)
input = sys.stdin.readline

N = int(input())
S = input().rstrip('\n')

ans = ""

letters = list(string.ascii_uppercase)
for s in S:
    tmp = letters.index(s)
    ans += letters[(tmp + N) % 26]

print(ans)

Solution (Python):
N=int(input())
s=list(str(input()))
char=[chr(i) for i in range(65, 65+26)]
for i in range(len(s)):
  s[i]=char.index(s[i])+N
  if s[i]>=26:
    s[i]-=26
  s[i]=char[s[i]]
print(''.join(s))

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

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

Solution (Python):
import sys
from collections import defaultdict
from copy import deepcopy

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

alpha_dict = {}
beta_dict = {}
for i,c in enumerate(range(ord('A'),ord('Z')+1)):
    alpha_dict[chr(c)] = i + 1
    beta_dict[(i + 1)%26] = chr(c)

ans = []
for i in range(len(S)):
    x = S[i]
    num = alpha_dict[x]
    num += N
    num %= 26
    ans.append(beta_dict[num])

print(''.join(ans))

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

new = ''
for c in S:
    tmp = ord(c)+N
    if tmp > 90:
        tmp -= 26
    new += chr(tmp)

print(new)

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


S1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = []

for i,s in enumerate(S) :
    idx = S1.find(s)
    idx += N
    ans.append(S1[idx:idx+1])

aans = ''

for a in ans:
    aans += a

print(aans)

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

Solution (Python):
N = int(input())
S = input()
l = len(S)
L = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in range(l):
    ans += L[(L.index(S[i]) + N) % 26]
print(ans)

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

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

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

alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)

x = ''
i = 0

for c in s:
	a = alpha2num(c)
	b = a + n
	if (b > 26):
		b = b - 26
	x = x + num2alpha(b)
	i += 1

print(x)

Solution (Python):
N = int(input())
S = input()
ans = str()
for s in S:
    ans += chr(((ord(s)-ord('A')) + N)%(ord('Z')-ord('A') + 1) + ord('A'))
print(ans)

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

s=[]
for i in range(len(S)):
  if ord(S[i])+N >= 91:
    j = (ord(S[i])+N -65)%26+65
    s.append(chr(j))
  else:
    s.append(chr(ord(S[i])+N))
print(''.join(s))

Solution (Python):
N = int(input())
S = input()
conv = []
rev = 0

for s in S:
  if s == 'Z':
    rev = 26 - N
    conv.append(chr((ord(s) - ord('A') - rev) % 26 + ord('A')))    
  else:
    conv.append(chr((ord(s) - ord('A') + N) % 26 + ord('A')))

ans = "".join(conv)
print(ans)

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

ns = []

for ch in S:
    ns.append(chr((ord(ch) - ord('A') + N) % 26 + ord('A')))

print("".join(ns))

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

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

result = ''

for char in S:
  result += str[(str.find(char)+N) % 26]
  
print(result)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    S = input()

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


main()

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

    str_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

    ans_list = []
    for i in range(len(s)):
        tmp = str_list.find(str(s[i]))
        index_tmp = tmp+n
        if index_tmp >= len(str_list):
            index_tmp -= len(str_list)

        ans_list.append(str_list[index_tmp])

    mojiretsu = ''.join(ans_list)
    print(mojiretsu)



if __name__ == '__main__':
    main()

Solution (Python):


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

ans =""

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"]

n = int(len(S))

for i in range(n):
    for j in range(len(alf)):
        if S[i]==alf[j]:
            if j+N < len(alf):
                ans += alf[j+N]
            else:
                k = int(j+N-len(alf))
                ans += alf[k]




print(ans)

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

str = ""
for c in s:
    diff = ord(c) - ord("A")
    str += chr((diff + n) % 26 + ord("A"))
print(str)

Solution (Python):
N = int(input())
S = str(input())
H = ['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']
tmp = 0
ans = []

for i in range(0, len(S)):
  tmp = H.index(S[i])
  tmp = tmp + N
  ans.append(H[tmp])

print(''.join(map(str, ans)))

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

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

print(ans)

Solution (Python):
N = int(input())
S = input()
A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print("".join([A[(A.index(s)+N)%(len(A))] for s in S]))

Solution (Python):

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

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

for s in S:
    for i in range(26):
        if s==ref[i]:
            x.append(ref[(i+N)%26])
for i in range(len(x)):
    print(x[i],end="")

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

a_z =[chr(ord('A') + i) for i in range(26)]
new_S=[]

for i in range(len(S)):
  old_index=a_z.index(S[i])
  new_index=(old_index+n)%26
  new_S.append(a_z[new_index])

print(*new_S, sep='')

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

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


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

alpha_swap = {v:k for k, v in alpha_dict.items()}
s_val = [(alpha_dict[val] + n) % 26 for val in s]
ans = ''
for val in s_val:
    ans += alpha_swap[val]

print(ans)

Solution (Python):
import sys
import math
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

num = I()
s = S()
N = len(s)

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

ans = ""
for i in range(N):
  ans += t[(ret[s[i]] + num) % 26]
print(ans)

Solution (Python):
value = int(input())
data = input()
result = ''
value = value % 26
for i in data:
    if ord(i) + value > 90:
        result += chr(64 + ord(i) + value - 90)
    else:
        result += chr(ord(i) + value)
print(result)

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



def getConverseCodes(args):
    converseCodes = ''
    for s in args:
        
        s = ord(s)
        if s + N <= 90:
            s = s + N
        else:
            s = (s + N - 65) % 26 + 65
       
        s = chr(s)
        converseCodes += s
    return converseCodes


print(getConverseCodes(S))

Solution (Python):
n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alpha2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
alpha2 = list(alpha2)
for i in range(len(s)):
  num = alpha.index(s[i])
  s = s[:i]+alpha2[num+n]+s[i+1:]
print(s)

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

enc = ""

for char in S:
  ASCII = ord(char)+N
  if ASCII >= 91:
    ASCII-=26
  enc += chr(ASCII)

print(enc)

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

S = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

s_split = list(s)



new_str_list = []
for i in range(len(s)):
    no = S.find(s[i])
    number = (no+n)%26
    new_str = S[number]
    
    
    new_str_list.append(new_str)


print("".join(new_str_list))

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

A_num = ord('A')
Z_num = ord('Z')
ans = ''

for char in s:
  next_char_num = ord(char) + n
  
  if next_char_num > Z_num:
    next_char_num = A_num - 1 + (next_char_num % 90)
  ans += chr(next_char_num)

print(ans)

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

alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
a = ''
for ss in s:
    a += alp[int(alp.find(ss))+n]
print(a)

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
dic = {a[i]:i for i in range(len(a))}
dic_ = {i:a[i] for i in range(len(a))}

len_a = len(dic)
ans = ""
for s in S:
    
    num = dic[s]
    
    new_num = num + N
    
    if new_num > 25:
        
        new_num = new_num - 26
        
    else:
        pass
    ans += dic_[new_num]
    
print(ans)

Solution (Python):
N=int(input())
S=input()
T=[0]*len(S)

alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(0,len(S)):
  u=alpha.index(S[i])
  a=u+N
  if a>=26:
    a-=26
  T[i]=alpha[a]

print("".join([str(n) for n in T]))

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

alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)
list = []
for i in S:
    number = alpha2num(i)
    number_after = number + N
    if number_after > 26:
        number_after = number_after - 26
    i = num2alpha(number_after)
    list.append(i)

print(''.join(list))

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

ans = []
for s in S:
    ans.append(chr((ord(s) - 65 + N)%26 + 65))
print(''.join(ans))

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

ans = []
for v in s:
    a = ord(v) + n
    if a > 90:
        a = 64 + a - 90
    ans.append(chr(a))
print("".join(ans))

Solution (Python):
n=int(input())
s=list(input())
k=list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
a=[]
for i in s:
    a.append(k[k.index(i)+n])
print("".join(a))

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

begin = ord('A')
end = ord('Z')
modulo = end - begin + 1

ans = [(ord(c) - begin + n) % modulo for c in s]
ans = ''.join([chr(o + begin) for o in ans])

print(ans)

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

s = list(S)
alphabet = [chr(i) for i in range(65, 65 + 26)]

dst = ''
for k in range(len(s)):
  for i in range(26):
    if alphabet[i] == s[k]:
      num = (i + N) % 26
      dst = dst + alphabet[num]
      break
print(dst)

Solution (Python):
import string
import itertools


def main(n: int, s: str):
    
    
    letters_cycle = string.ascii_uppercase + string.ascii_uppercase

    print(''.join([
        letters_cycle[ord(ch) - 65 + n]
        for ch in s
    ]))


if __name__ == '__main__':
    a = [input() for i in range(2)]

    main(int(a[0]), a[1])

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

dif = ord('A')
for i in range(len(s)):
  code = ((ord(s[i])+n) % dif) % 26
  print(chr(code+dif),end='')
print()

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","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)):
    for j in range(52):
        if S[i] == alphabet[j]:
            S[i] = alphabet[j+N]
            break

print("".join(S))

Solution (Python):
N = int(input())
S = input()
L = len(S)
a1 = "a"
alpha  = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range (0,L):
  for j in range (0,26):
    if S[i] == alpha[j]:
      a1 = a1 + alpha[j+N]
print(a1[1:L+1])

Solution (Python):
l=[chr(i) for i in range(65,65+26)]
N=int(input())
S=list(input())
w=''
for s in S:
    w+=l[l.index(s)+N] if l.index(s)+N <= 25 else l[l.index(s)+N-26]
print(w)

Solution (Python):
n=int(input())
s=input()
answer=""
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']
for i in range(len(s)):
    answer+=alphabet[alphabet.index(s[i])+n]
print(answer)

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

Solution (Python):
N = int(input())
S = input()
T = ''
for c in S:
    a = ord(c) + N
    if a > ord('Z'):
        a = a - ord('Z') + ord('A') - 1
    T += chr(a)
print(T)

Solution (Python):
def rotate_string(s, n):
    s = s.lower()
    result = ""
    for i in range(len(s)):
        chr_num = 97 + (((ord(s[i]) + n) - 97) % 26)
        result += chr(chr_num)
    return result.upper()


def solve():
    n = int(input())
    s = input()
    print(rotate_string(s,n))


if __name__ == "__main__":
    solve()

Solution (Python):


def main():
    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))
if __name__ == '__main__':
    main()

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

def rot_n(c, n):
    return chr((ord(c) - ord('A') + n) % 26 + ord('A'))

print(''.join((rot_n(c, n) for c in s)))

Solution (Python):
n = int(input())
s = list(input())
import string
ABC = list(string.ascii_uppercase)
for i in range(len(s)):
    s[i] = ABC[(ABC.index(s[i]) + n) % 26]
for i in range(len(s)):
    print(s[i], end = '')
print('\n')

Solution (Python):
N = int(input())
S = list(input())
res = ''
for s in S:
  b = ord(s) + N
  while b > ord('Z'):
    b -= (ord('Z')-ord('A')+1)
  res += chr(b)
print(res)

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

all_ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

result = ''
for i in range(len(s)):
    for j in range(len(all_)):
        if s[i] == all_[j]:
            result += all_[(j+n)%len(all_)]
            break

print(result)

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

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

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