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=list(input())
ans = ""
for s in S:
    ASCII = ord(s)
    n = ASCII - 65
    n = (n + N) % 26
    ASCII = n + 65
    ans += chr(ASCII)
print(ans)

Solution (Python):
n = int(input())
ss = input()
s = []
for i in ss:
    s.append(i)
res = ""
n = n % 26

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

Solution (Python):
import re


def main():
    N = int(input())
    S = input()
    a = ""
    Ans = ""

    for s in S:
        a = ord(s)+N
        if a > 90:
            a = a-26
        Ans += chr(a)

    print(Ans)


if __name__ == "__main__":
    main()

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']
ans = ''

for c in s:
    if alp.index(c) + n > 25:
        ans += alp[alp.index(c)+n-26]
    else:
        ans += alp[alp.index(c) + n]

print(ans)

Solution (Python):
def caesar(s, n):
    d = {}
    for c in (65, 97):
        for i in range(26):
            d[chr(i+c)] = chr((i+n) % 26 + c)

    return "".join([d.get(c, c) for c in s])

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

print(caesar(s, n))

Solution (Python):
import sys,queue,copy,math
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')
N = int(input())
S = list(input())
x = ""
ans =list()
for x in S:
    if ord(x)+N > ord('Z'):
        ans.append(ord('A') + (ord(x) + N - (ord('Z')))-1)
    else:
        ans.append(ord(x) + N)

ANS = list()
for i in range(len(S)):
    ANS.append(chr(ans[i]))

print("".join(ANS))

Solution (Python):
x = int(input())
y = input()
z = ""
s = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in y:
    num = s.index(i)
    z += (s[(num + x) % 26])
print(z)

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

for i in range(len(S)):
    
    n = Alpha.index(S[i])


    S[i] = Alpha[(n + N)%26]

print(*S,sep="")

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

Solution (Python):
N = int(input())
S = input()
ans = ''
alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)
for i in range(0,len(S)):
    y = alpha2num(S[i]) + N
    if y > 26:
        y -= 26
    ans += num2alpha(y)
print(ans)

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time

def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()

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

show_flg=False
show_flg=True

n=I()
s=input()
uu=u_alp*2
dict1=dict(zip(u_alp,range(0,26)))

a=[]
for i in s:
    a+=[uu[n+uu.index(i)]]
print(''.join(a))

Solution (Python):
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [c  for c in s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)

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

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

Solution (Python):
n = int(input())
s = [i for i in str(input())]
alpha_lst = [i for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]

print(''.join(tmp))

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']
b = 0
for i in range(len(s)):
    for j in range(len(a)):
        if s[i] == a[j]:
            if j+n > len(a)-1:
                s[i] = a[j+n-len(a)]
                break
            else:
                s[i] = a[j+n]
                
                break
print(''.join(s))

Solution (Python):


n = int(input())
str = input()
alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
str_list=list(str)
alphabet_list=list(alphabet)



i=0
j=0
if n==0:
    pass
else:
 for i in range(len(str)):
    for j in range(len(alphabet)):
        
        
     if str_list[i]==alphabet_list[j]:
            
            
           if n%26+j >= 26:
             
             
             str_list[i]=alphabet_list[(n%26+j)%26]
             break
             
             
           else:
                
                

                str_list[i]=alphabet_list[(n%26+j)%26]
                break
     else:
           pass

mojiretu=''.join(str_list)
print(mojiretu)

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

for k in s:
  a = ord(k) + n
  if a>90:
    a=a-26
    result = result + chr(a)
  else:
    result = result + chr(a)

print(result)

Solution (Python):
n = int(input())
S = input()
def rot_encode(n):
    from string import ascii_lowercase as lc, ascii_uppercase as uc
    lookup = str.maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n])
    return lambda s: s.translate(lookup)
print(rot_encode(n)(S))

Solution (Python):
import itertools
N = int(input())
S = input()
li = [i for i in S]
d_alpa = {'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}

keys = []
for i in li:
  va = d_alpa[i]+N
  if va <= 25:
    f_va = va
  elif va > 25:
    f_va = va - 26
  key = [k for k, v in d_alpa.items() if v == f_va]
  keys.append(key)

  
flatten_k = list(itertools.chain.from_iterable(keys))
k = ''.join(flatten_k)
print(k)

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"]
output = ""
for i in range(len(S)):
    num = ord(S[i])-65
    output += A[(N+num)%26]
print(output)

Solution (Python):
import math

n=int(input())
s=input()
t=''
num1=lambda c:chr(c+65)
for i in range(len(s)):
  t+=num1((ord(s[i])-65+n)%26)
print(t)

Solution (Python):
N=int(input())
S=input()
S_=[]
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 j in range(len(S)):
    for i in range(len(T)):
        if S[j] == T[i]:
            if i+N>=len(T):
                S_.append(T[i+N-len(T)])
            else:
                S_.append(T[i+N])
            break

y=""
for x in S_:
    y+=x

print(y)

Solution (Python):
num = int(input())
string = str(input())

new_str = ''
for x in string:
    if (ord(x) + num) > ord('Z'):
        new_str = new_str + chr((ord(x) + num) - 26)
    else:
        new_str = new_str + chr(ord(x) + num)

print(new_str)

Solution (Python):
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
A=[i.upper() for i in A]

S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>25:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

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

res = ''
for i in list(s):
    ascii = ord(i)
    a = ascii + n
    if a >= 91:
        b = a - 91
        res += chr(65 + b)
    else:
        res += chr(a)

print(res)

Solution (Python):
char_to_ind = dict()
ind_to_char = dict()
for i, char in enumerate("ABCDEFGHIJKLMNOPQRSTUVWXYZ"):
    char_to_ind[char] = i
    ind_to_char[i] = char


def solve(n, s):
    return "".join([ind_to_char[(char_to_ind[c] + n) % 26] for c in s])


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


def test():
    assert solve(2, "ABCXYZ") == "CDEZAB"
    assert solve(0, "ABCXYZ") == "ABCXYZ"
    assert solve(13, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == "NOPQRSTUVWXYZABCDEFGHIJKLM"


if __name__ == "__main__":
    test()
    main()

Solution (Python):
n = int(input())
s_old = input()
s = str(s_old).lower()


answer = ""

for char in list(s):
    ASCII = ord(char)
    num = ASCII - 97
    num = (num + n) % 26
    ASCII = num + 97
    answer += chr(ASCII)

print(answer.upper())

Solution (Python):
a = input()
b = input()

N = int(a)
S = b

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

st =""

for c in S:
    n = alpha_dict[c]
    n = n + N
    if (n > 26):
        n = n - 26
    keys = [k for k, v in alpha_dict.items() if v == n]
    st += str(keys[0])
    
print(st)

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

output = ""

for char in list(S):
    ASCII = ord(char)
    num = ASCII - 65
    num = (num + N) % 26
    ASCII = num + 65
    output += chr(ASCII)

print(output)

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

alist = ["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 S:
    print(alist[(alist.index(i)+N)%26],end="")

Solution (Python):
n=int(input())
s=input()
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']
S=list(s)
for i in range(len(S)):
  idx=lst.index(S[i])
  S[i]=lst[(idx+n)%(len(lst))]
t=''.join(S)
print(t)

Solution (Python):
n = int(input())
s = list(input())
answer = ''
alphabets = ['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']
alphabets_dict = {
  '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
}
for ss in s:
  num = alphabets_dict[ss]
  answer += alphabets[(num + n) % 26]
print(answer)

Solution (Python):
from string import ascii_uppercase

A = dict(zip(ascii_uppercase, range(26)))
B = list(ascii_uppercase)

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

def trans(c):
    return B[(A[c] + N) % 26]

print(''.join(list(map(trans, list(S)))))

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

KEY = N - 20

enc = ""

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

print(enc.upper())

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

t_1 = [chr(i) for i in range(65,65+26)]
t_2 = [chr(i) for i in range(65,65+26)]
t=t_1+t_2
new=[]
for i in S:
  num = t.index(i)+N
  new.append(t[num])
print("".join(new))

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

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

a = [chr(i) for i in range(65, 65+26)]
c = []
for i in range(len(s)):
    j = 0
    while s[i] != a[j]:
        j+=1
    b = (j+n)%26
    c.append(a[b])
d = c[0]
for i in range(len(c)-1):
    d += c[i+1]
print(d)

Solution (Python):
strs = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'  
shift = int(input())
data = []
inp = input()
for i in inp:                     
    data.append(strs[(strs.index(i) + shift) % 26]) 
output = ''.join(data)
print(output)

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



class Solver(object):
    def __init__(self):
        pass

    def solve(self, N, S):
        ans = ""
        for s in S:
            ans += chr(((ord(s)-65)+N) % 26+65)
        return ans


def main():
    N = int(input())
    S = input().rstrip()

    solver = Solver()
    print(solver.solve(N, S))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = input()
alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
             'V', 'W', 'X', 'Y', 'Z']
new_string = ''

for s in S:
    new_string += (alphabets[(alphabets.index(s) + N) % 26])

print(new_string)

Solution (Python):
def is_upper(c):
  return ord('A') <= ord(c) and ord(c) <= ord('Z')
def shift(c, k):
  if is_upper(c):
    return chr((ord(c) - ord('A') + k) % 26 + ord('A'))
  else:
    return c
def caesar(s, k):
  return "".join([shift(c, k) for c in s])
N = int(input())
S = input()
enc = caesar(S, N)
print(enc)

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

for i in range(len(s)):
    if string.index(s[i]) + n <= 25:
        s[i] = string[string.index(s[i]) + n]
    else:
        s[i] = string[string.index(s[i]) + n-26]

print(*s, sep='')

Solution (Python):
N = int(input())
S = list(str(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',
         '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_index = []
for i in S:
    S_index.append(Alpha.index(i))
    
S_plus = map(lambda x: x + N, S_index)

output_w = []
for j in S_plus:
    output_w.append(Alpha[j])
    
answer = ''.join(output_w)
print(answer)

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

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

Solution (Python):
n, s = input(), input()
out = ""
for i in range(len(s)):
    a = ord(s[i].upper()) % 65
    out += chr((a + int(n) % 26) % 26 + 65)
print(out)

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

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

chars = list(s)

alpha2num = lambda c: ord(c) - ord('A') + 1
num = []
for i in range (0,len(chars)):
  if alpha2num(chars[i])+n >26:
    num.append(alpha2num(chars[i])-26+n)
  else:
    num.append(alpha2num(chars[i])+n)

num2alpha = lambda c: chr(c+64)
alp = []
for i in range (0,len(num)):
  alp.append(num2alpha(num[i]))

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

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

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

print(ans)

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

al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

for i in range(len(S)):
  m = al.index(S[i])
  n = (1 + m + N) % 26 - 1
  Sr.append(al[n])
  
print(''.join(Sr))

Solution (Python):
number = int(input())
words = list(input())


offset = 65
answer = ""

for i in words:
    num = (ord(i) - offset + number) % 26 + offset
    answer += chr(num)

print(answer)

Solution (Python):
N = int(input())
S = input()
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def get_str_leading_n(string, alphabets, N):
    index_ = (alphabets.index(string.upper()) + N) % 26
    return alphabets[index_]
output = "".join(list(map(lambda p: get_str_leading_n(p, alphabets, N), S)))
print(output)

Solution (Python):
N=int(input())
S=input()
alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
out=[]
for s in S:
    index = alphabet.index(s)
    new_index = (index+N)%len(alphabet)
    new_s = alphabet[new_index]
    out.append(new_s)
print(''.join(out))

Solution (Python):
a=[chr(ord('A') + i) for i in range(26)]
a=a*3
n=int(input())
s=input()
t=""
for i in s:
    t+=a[a.index(i)+n]
print(t)

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

ans = []

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

for alpha in s:
    now_alpha_num = alpha_dict[alpha]
    if (now_alpha_num + n) <= 26:
        return_alpha = [k for k, v in alpha_dict.items() if v == now_alpha_num + n]
    else:
        return_alpha = [k for k, v in alpha_dict.items() if v == now_alpha_num + n - 26]

    ans.append("".join(return_alpha))

print("".join(ans))

Solution (Python):
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1
N = int(input())
S = input()
s_list = list(S)
ANS = ''
if N >= 27:
    kazu = int(N/26)
    hiku = int(kazu * 26)
    N = (N - hiku)
for i in s_list:
    AA = (N + alpha2num(i))
    if AA >= 27:
        AA = AA - 26
    ANS += num2alpha(AA)
print(ANS)

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

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

ans = ""
for s in S:
  offset = ord(s) - A
  new_code = (offset + N) % 26 + A
  ans += chr(new_code)

print(ans)

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

al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

for i in range(len(S)):
  n = al.index(S[i])
  Sr.append(al[(1 + n + N) % 26 - 1])
  
print(''.join(Sr))

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

al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

for i in range(len(S)):
  n = al.index(S[i])
  Sr.append(al[(1 + n + N) % 26 - 1])
  
print(''.join(Sr))

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

S=input()

result = ""
for c in S:
    
    if ord('a') <= ord(c) <= ord('z') :
        result = result + chr(abs(((ord(c) + N + ord('a')) % 26)) + ord('a'))
    else :
        result = result + chr(abs(((ord(c) + N + ord('A')) % 26)) + ord('A'))

print (result)

Solution (Python):
N = int(input())
S = input()
l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in range(len(S)):
    a = l.index(S[i])+N
    if a > 25:
        ans += l[a-26]
    else:
        ans += l[a]
print(ans)

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

new_alph = [i for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']
new_S = [i for i in S]

for i in range(len(new_S)):
    try:
        new_S[i] = new_alph[new_alph.index(new_S[i])+N]
    except:
        new_S[i] = new_alph[new_alph.index(new_S[i])+N-26]
        
ans = ''.join(new_S)

print(ans)

Solution (Python):

n = int(input())
s = input()
ans = ""
for c in s :
    ans = ans + chr(abs(((ord(c) + n - ord('A')) % 26)) + ord('A'))
print(ans)

Solution (Python):
N=int(input())
S=list(input())
 
ans=[]
for i in S:
    if ord(i)+N>90:
        temp=chr(ord(i)+N-26)
        ans.append(temp)
    else:
        temp=chr(ord(i)+N)
        ans.append(temp)
 
f=''.join(ans)
 
print(f)

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

def getChar(char, num):
    if num > 25:
        num %= 26

    if num + ord(char) > 90:
        num -= 26

    return chr(ord(char) + num)

result =""
for i in s:
    result += getChar(i, n)

print(result)

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

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

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

print(ans)

Solution (Python):
def RotN():  
    N = int(input())
    alfabet = input()
    
    alfabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    count = []
    chara = ""
    for alfa in alfabet:
        for i, alfa2 in enumerate(alfabet2):
            if alfa2==alfa:
                c = i+N
                if c>=26:
                    c=c-26
                    chara+=alfabet2[c]
                    
                else:
                    chara+=alfabet2[c]
    print(chara)
if __name__ == "__main__":
    RotN()

Solution (Python):
strs='A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'.split(' ')
num=int(input())
alphas=list(input())
new_alphas=[]
new_num=0
for a in alphas:
    new_num=(num+strs.index(a))%26 
    new_alphas.append(strs[new_num])
print(''.join(new_alphas))

Solution (Python):

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

s = []
p = []
P = []

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

s = list(S)

for i in s:
    o = alf.index(i)
    o += N
    if o > 25:
        o = o - 25
        o -= 1
        p.append(str(alf[o]))
        P = ','.join(p)
        P = P.replace(',',"")
    else:
        p.append(str(alf[o]))
        P = ','.join(p)
        P = P.replace(',',"")

print(P)

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

master=['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 i in s:
  count=0
  for k in master:
    if i == k:
      if count + n > 25:
        minus = 25 - (count-1)
        answer = answer + master[n - minus]
      else:
        answer = answer + master[count + n]
    count = count + 1

print(answer)

Solution (Python):
N = int(input())
S = 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']
return_word = []
for i in range(len(S)):
  num = alphabet.index(S[i])
  return_num = N + num
  if return_num > 25:
    return_num = return_num - 26
  return_alphabet = alphabet[return_num]
  return_word.append(return_alphabet)
final = ''
for alpha in return_word:
  final += alpha
print(final)

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

right_dict = { chr(65 + i):i + 1 for i in range(26) }

s_list = [i for i in s]

new_list=[]
for word in s_list:
    num = right_dict[word]
    if num + n > 26:
        right_num = num + n -26
        for k,v in right_dict.items():
            if v == right_num:
                new_list.append(k)
    else:
        right_num = num + n
        for k,v in right_dict.items():
            if v == right_num:
                new_list.append(k)
print(''.join(new_list))

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

ans=""

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

print(ans)

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

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):
K = int(input())
def enc(k, m):
  plain = list(m.encode("ascii")) 
  cipher = plain.copy() 
  for i,code in enumerate(plain ):
    cipher[i] = cipher[i] + k
    if (cipher[i] > 90):
      cipher[i] = cipher[i] - 26      
  return(bytes(cipher ). decode("ascii"))
angobun = enc(K,input())
print(angobun)

Solution (Python):
import string
n=int(input())
s=input()
a=string.ascii_uppercase*2
ans=""
for i in s:
    ans+=a[a.index(i)+n]
print(ans)

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = int(input().strip())
def shifttext(shift):
    S = str(input('').upper())
    data = []
    for i in S:
        if i.strip() and i in alphabet:
            data.append(alphabet[(alphabet.index(i) + shift) % 26])
        else:
            data.append(i) 
    output = ''.join(data)
    return output
print(shifttext(N))

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 
N = int(input().strip())
def shifttext(shift):
    S = str(input('').upper()) 
    data = []
    for i in S: 
        if i.strip() and i in alphabet: 
            data.append(alphabet[(alphabet.index(i) + shift) % 26])
        else:
            data.append(i) 
    output = ''.join(data)
    return output
print(shifttext(N))

Solution (Python):
num = int(input())
S = str(input())
S2 = list(S)

for i in range (0,len(S)):
    tmp = ( ord(S[i]) - ord("A") + num ) % 26 + ord("A")   
    S2[i] = chr(tmp)
ans = "".join(S2)
print(ans)

Solution (Python):
def caesar(s, n):
    ns = []
    for ch in s:
        
        if ('A' <= ch and ch <= 'Z'):
            ns.append(chr((ord(ch) - ord('A') + n) % 26 + ord('A')))
            
        
        else:
            ns.append(ch)
    return "".join(ns)

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

print(caesar(S, N))

Solution (Python):
n = int(input())
s = list(input())
li_c =[]
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"]
for x in s:
  c = li.index(x)
  c += n
  if c > 25:
    c -= 26
  print(li[c], end = "")

Solution (Python):
n = int(input())
s = input()
alphabet = [chr(i) for i in range(65, 65+26)]
result = ""
for char in s:
  idx = (alphabet.index(char) + n) % 26
  result += alphabet[idx]
print(result)

Solution (Python):
n=int(input())
s=list(input())
dic={"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}
di={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"}
li=[]
t=len(s)
for i in range(0,t):
  k=s[i]
  m=dic[k]
  a=(m+n)%26+1
  b=di[a]
  li.append(b)
print("".join(li))

Solution (Python):
str_list = [chr(i) for i in range(65,65 + 26)]
n = int(input())
s = input()
new_s = []
for i in s:
    tmp = ord(i) + n if ord(i) + n < 65 + 26 else  (ord(i) + n) % (65 + 26) + 65 
    new_s.append(chr(tmp))
print(''.join(new_s))

Solution (Python):
def changeStr(num, charactor):
  sum = num + ord(charactor)
  if sum > 64 + 26 :
    return chr(sum - 26)
  else:
    return chr(sum)

inputStr = [input() for i in range(2)]
num = int(inputStr[0])
targetStr = inputStr[1]

for target in list(targetStr):
  print(changeStr(num, target), end="")

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 
N = int(input().strip())
def shifttext(shift):
    S = str(input('').upper()) 
    data = []
    for i in S: 
        if i.strip() and i in alphabet: 
            data.append(alphabet[(alphabet.index(i) + shift) % 26])
        else:
            data.append(i) 
    output = ''.join(data)
    return output
print(shifttext(N))

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

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

Solution (Python):
def caesar(s, n):
    ns = []
    for ch in s:
        ns.append(chr((ord(ch) - ord('A') + n) % 26 + ord('A')))
    return "".join(ns)

n = int(input())
s = str(input())
result = caesar(s, n)
print(result)

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



for i in s:
    if ord(i)+n > z:
        ans.append(chr(ord("A") - (z-ord(i)-n)  -1))
    else:
        ans.append(chr(ord(i)+n))


print("".join(ans))

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

L=["A", "B", "C", "D", "E", "F", "G", "H", "I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
A="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

num=0
ans=""
for i in S:
    num=A.find(i) + N
    if num>25:
        num=num-26
    ans=ans+L[num]
print (ans)

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

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

def inverse_dict(d):
    return {v:k for k,v in d.items()}

i_dict = inverse_dict(dict)

for i in range(len(S)):
  print(i_dict[(dict[S[i]] + N) % 26], end="")

Solution (Python):
N = int(input())
str = [input() for i in range(1)]
STRING=str[0]
enc = ""

for i in list(STRING):
    ASCII = ord(i)
    num = ASCII - 65
    num = (num + N % 26)
    ASCII = num + 65
    if ASCII > 90:
        ASCII -= 26
    enc += chr(ASCII)
print(enc)

Solution (Python):
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
m = int(input())
list = input()
newlist = []
n = len(list)
for i in range(n):
	if int(alpha.find(list[i])) + m < 26:
		newlist.append(alpha[int(alpha.find(list[i])) + m])
	else:
		newlist.append(alpha[int(alpha.find(list[i])) + m -26]) 
moji = ''.join(newlist)
print(moji)

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

for i in range (0, len(S)):
    if ord(S[i]) + N <= 90:
        character.append(chr(ord(S[i]) + N))
    else :
        character.append(chr(ord(S[i]) + N - 89 +63))

answer = "".join(character)

print(answer)

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

A = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
T =""
for i in S:
    k=A.index(i)+int(N)
    t=A[k]
    T +=t

print(T)

Solution (Python):






from sys import stdin,setrecursionlimit




import string


setrecursionlimit(10**6)
input=stdin.readline

n=int(input().rstrip())
s=input().rstrip()
abc=string.ascii_uppercase*2
ans=""
for i in s:
    ans+=abc[abc.index(i)+n]
print(ans)

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

Solution (Python):
n = int(input())
s = input()
S = [i for i in s]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i, value1 in enumerate(S):
    for j, value2 in enumerate(a):
        if value1 == value2:
            if j+n >= len(a):
                S[i] = a[j+n-len(a)]
                break
            else:
                S[i] = a[j+n]
                break    
S = "".join(S)
print(S)

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

for s in S:
    index=ord(s)
    if index+N>=91:
        print(chr(index+N-26),end="")
    else:
        print(chr(index+N),end="")

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
S = input()



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

print(ans)