Problem:
 Score : 200 points    Problem Statement We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.  Shift each character of S by N in alphabetical order (see below), and print the resulting string.  We assume that A follows Z . For example, shifting A by 2 results in C ( A  \to  B  \to  C ), and shifting Y by 3 results in B ( Y  \to  Z  \to  A  \to  B ).      Constraints  0 \leq N \leq 26  1 \leq |S| \leq 10^4  S consists of uppercase English letters.         Input Input is given from Standard Input in the following format:  N  S       Output Print the string resulting from shifting each character of S by N in alphabetical order.        Sample Input 1 2
ABCXYZ      Sample Output 1 CDEZAB  Note that A follows Z .       Sample Input 2 0
ABCXYZ      Sample Output 2 ABCXYZ       Sample Input 3 13
ABCDEFGHIJKLMNOPQRSTUVWXYZ      Sample Output 3 NOPQRSTUVWXYZABCDEFGHIJKLM

Solution (Python):
n = int(input())
s = input()
ans = ''
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']
for i in range(0, len(s)):
    for j in range(0, 26):
        if s[i] == alf[j]:
            if j+n > 25:
                ans += alf[j+n-26]
            else:
                ans += alf[j+n]
print(ans)

Solution (Python):
import sys
N = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()

al = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans =''
for s in S:
    for i in range(len(al)):
        if s == al[i]:
            ans +=al[i+N]
            break
print(ans)

Solution (Python):
import sys

def num2alpha(c):
    return chr(c+64)

def alpha2num(c):
    return ord(c) - ord('A') + 1

def solve(n, s):
    for s_i in s:
        print(num2alpha((alpha2num(s_i) + n - 1) % 26 + 1), end="")
    print("")

if __name__ == '__main__':
    n = int(sys.stdin.readline().strip())
    s = sys.stdin.readline().strip()
    solve(n, s)

Solution (Python):
n=int(input())
s=list(input())
t=['a']*(len(s))
list=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(len(s)):
    c=list.index(s[i])+n if list.index(s[i])+n <= 25 else list.index(s[i])+n-26
    t[i]=list[int(c)]
print(*t,sep='')

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

def getConverseCodes(args, i):
	converseCodes = ''
	for s in args:
		s = ord(s)
		if 65 <= s and s<= 90:
			s = s + i
		elif 97 <= s and s <= 122:
			s = s + i
		
		if s >= 91:
			s -= 26
		s = chr(s)
		converseCodes += s
	return converseCodes

for i in range(len(s)):
	a.append(getConverseCodes(s[i],n))
print ("".join(a))

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

alpha = input()

str_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'


new_str_alphabet=''
for i, alphabet in enumerate(alpha):
    new_idx = str_alphabet.find(alphabet) + N
    new_alphabet = str_alphabet[new_idx%26]
    new_str_alphabet = new_str_alphabet + new_alphabet

print(new_str_alphabet)

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

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in range(len(s)):
    moji = s[i]
    ans += a[(a.find(moji) + n )% 26]
    
print(ans)

Solution (Python):
n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
output = ""
for c in range(len(s)):
    num = alpha.find(s[c]) + n
    if num > 25:
        num -= 26
    output = output + alpha[num]
print(output)

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

result = list()
for x in S:
    c = ord(x) + N
    result.append(chr((c%90)+64 if c > 90 else c))

print(''.join(result))

Solution (Python):
N = int(input())
S = input()
for j in range(N):
    S_ = []
    for i in S:
        if ord(i) == 90:
            mozi = chr(65)
        else:
            mozi = chr(ord(i)+1)

        S_.append(mozi)
    S = S_
for i in S:
    print(i,end="")

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

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

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

Solution (Python):
n = int(input())
s = input()
ans = []
for i in s:
    ask = ord(i)
    if (ask+n) > ord('Z'):
        a = n+ask-ord('Z')
        ans.append(chr(ord('A')+a-1))
    else:
        ans.append(chr(ask+n))
print("".join(ans))

Solution (Python):
n = int(input())
s = input()
output = ''
for x in s:
  num = ord(x)+n
  if num <= 90:
    output += chr(num)
  else:
    output += chr(num%90+64)
print(output)

Solution (Python):
li = [chr(i) for i in range(65,65+26)]
n = int(input())
s = input()
ans = ""
for i in s:
    num = int(li.index(i))+n
    if num>25:
        num -= 26
    ans += li[num]
print(ans)

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

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

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

print('')

Solution (Python):
n=int(input())
a=input()
b=''
for i in a:
  x=ord(i)+n

  if x>90:
    x=x-26
  b=b+chr(x)
print(b)

Solution (Python):
n=int(input())
s=input()
s1='
for x in s:
 	t1=ord(x)+n
 	if(t1>90):
 		s1+=chr(t1-91+65)
 	else:
 		s1+=chr(t1)
print(s1[1:])

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

import string
alf = string.ascii_uppercase

ans =''
for i in s:
    
    for index,j in enumerate(alf):
        
        if i == j:
            num = (index+n)%26
            ans += alf[num]

print(ans)

Solution (Python):

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

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

for i in s:
    letter.append(i)

for i in letter:
    for j in range(0, 26):
        if  i == string[j]:
            tmp = j + n
            
            if tmp > 25:
                tmp = tmp % 26
            ans.append(string[tmp])


print(''.join(ans))

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

def rot(s):
    alpha2num = lambda c: ord(c) - ord('A')
    num=alpha2num(s)
    return chr((num+N)%26+65)

l=[]
for i in range(len(S)):
    l.append(rot(S[i]))
print(''.join(l))

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

for i in range(len(s)):
  a = (ord(s[i])+n)
  if a > ord('Z'):
    a = a - ord('Z') + ord('A') - 1
  s[i] = chr(a)

print(*s, sep='')

Solution (Python):
a=[chr(i) for i in range(65,65+26)]
a=a+a
b=''
n=int(input())
s=input()
for i in s:
  for j in range(26):
    if i==a[j]:
      b=b+a[j+n]
      break
print(b)

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    s = input()
    ans=""


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

Solution (Python):
n = int(input())
s = list(input())
alpha_dict = {}
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1
ans = []
for item in s:
  k = (alpha2num(item)+n)%26
  if k == 0:
    k = 26
  ans.append(num2alpha(k))
L=''.join(ans)
print(L)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()

s = input()
s = s.lower()

alpha = [chr(ord('a') + i) for i in range(26)]





ans = []
for c in s:
  for i, p in enumerate(alpha):
    if c == p:
      
      i = i + n
      i = i % 26
      ans.append(alpha[i].upper())
      
      
      

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

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


def main():
    N = int(input())
    S = input()
    S = list(map(lambda c: rot_n(c, N), list(S)))
    print("".join(S))


main()

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

n = int(input())
s = input().replace('\n', '')

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

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

alfa = ["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)):
    num = alfa.index(S[i])
    num += N
    if num >= 26:
        num -= 26
    S2.append(alfa[num])

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

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

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')))
    return "".join(ns)

result = caesar(b, a)
print(result)

Solution (Python):
import string

N = int(input())
S = list(input())
alphabet = list(string.ascii_uppercase)
ans = list()
for target in S:
	
	
	ans.append(alphabet[(alphabet.index(target)+N)%26])
print(''.join(ans))

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

n = int(n)

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

res = ""

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

Solution (Python):
N = int(input())
S = input()
ans = [0] * len(S)
alpha_list = [chr(i) for i in range(65, 65+26)]
alpha_dict = {}
for i in range(len(alpha_list)):
    alpha_dict[alpha_list[i]] = i

for i in range(len(S)):
    s = S[i]
    pos = alpha_dict[s]
    if pos + N < 26:
        ans[i] = alpha_list[pos + N]
    else:
        pos = pos - 26
        ans[i] = alpha_list[pos + N]

print(*ans, sep = "")

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32
a = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')


def solve(N: int, S: str):
    al = a+a
    ans = []
    for i in range(len(S)):
        ans += al[al.index(S[i])+N]

    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):
n = int(input())
s = input()
s1 = []

alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for a in s:
    s1.append(alph[(alph.index(a) + n)%26])

print("".join(s1))

Solution (Python):
n = int(input())
s = input()
slis = list(s.lower())
anslis = []
alis = []
for i in slis:
    anslis.append(ord(i)-97+n)
for c,i in enumerate(anslis):
    if i > 25:
        anslis[c] = i%26
    alis.append(chr(anslis[c] + 97))
ans = "".join(alis)
ans = ans.upper()
print(ans)

Solution (Python):
n = int(input())
s = list(input())
alpha_dict = {}
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1
ans = []
for item in s:
  k = (alpha2num(item)+n)%26
  if k == 0:
    k = 26
  ans.append(num2alpha(k))
L=''.join(ans)
print(L)

Solution (Python):
N = int(input())
S = list(input())
alph = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
  S[i] = alph[(alph.index(S[i]) + N) % 26]
  
print("".join(S))

Solution (Python):
def f(c,x):
    o = ord(c)
    r = chr(o+x) if o+x <= ord("Z") else chr(o+x-26)
    return r

n = int(input())
s = input()
s_t = ""
for i in s:
    s_t += f(i,n)
print(s_t)

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


arph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
d = {s: i for i, s in enumerate(arph)}

_n = int(input())
_s = input()[:-1]


def idx(s, n):
    rs = ''
    for si in s:
        i = d[si]
        i = (i + n) % 26
        si = arph[i]
        rs = rs + si

    print(rs)


idx(_s, _n)

Solution (Python):
list = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
n = int(input())
S = input()
k = []
p = []
ans = ""
for i in range(len(S)):
    k.append(S[i])
for i in range(len(k)):
       for j in range(26):
           if k[i] == list[j]:
              p.append(list[j+n])
for i in range(len(k)):
    ans += p[i]
print(ans)

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

alp=[chr(i) for i in range(65,65+26)]
nS=[]
for i in range(len(S)):
  l=alp.index(S[i])
  nl=(l+N)%26
  nS.append(alp[nl])
print("".join(nS))

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ad = {}

for i in range(26):
	ad[a[i]] = i

ans = ''
for i in range(len(s)):
	tmp = (ad[s[i]]+n)%26
	ans += a[tmp]

print(ans)

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

metamol = ""

for m in S:
    metamol += alphabet[(alphabet.index(m) + N) % 26]

print(metamol)

Solution (Python):
n = int(input())
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'
       ]
S = input()
for i in range(len(S)):
  print(Alph[(Alph.index(S[i]) + n) % 26], end='')

Solution (Python):
n = int(input())
s = list(input())
res = []
for si in s:
    new = ord(si) + n
    if new > 90:
        new += 6
    res.append(chr(new))
print(''.join(res).upper())

Solution (Python):

import sys

def _s(): return sys.stdin.readline().strip()
def _i(): return int(sys.stdin.readline().strip())

n= _i()
s= _s()

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

ans=""
for c in s: ans += f(c,n)
print(ans)

Solution (Python):
n = int(input())
s = input()
print(''.join([chr((ord(c)+n)-26*(ord(c)+n>90)) for c in s]))

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

modN = N % 26

char_s = ""
numZ = ord('Z')
numA = ord('A')
for c in S:
    numC = ord(c)
    if (numC + modN > numZ):
        char_s += chr(numA + (modN - (numZ - numC) - 1))
    else:
        char_s += chr(numC + modN)
print(char_s)

Solution (Python):
import string

N = int(input())
S = input()
R = 26

d = dict(zip(string.ascii_uppercase, range(26)))
inv_d = {v: k for k, v in d.items()}

ans = ""

for c in S:
    i = d[c]
    new_i = (i + N) % R
    ans += inv_d[new_i]

print(ans)

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

alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
result = ''
for c in s:
    result += alp[alp.find(c)+n]

print(result)

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

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

mod = ord("Z") - ord("A")

for i in range(len(s)):
    c = ord(s[i]) - ord("A")
    c += n
    c %= mod + 1
    print(chr(c + ord("A")),end = "")
print()

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

s = list(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"]
for i in range(len(s)):
  index = alpha.index(s[i])
  index += n
  if index > 25:
    index -= 26
    s[i] = alpha[index]
  else:
    s[i] = alpha[index]
print("".join(s))

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

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 2
conv = dict(zip(alphabet[:26], alphabet[N: N + 26]))
print(''.join([conv[c] for c in S]))

Solution (Python):
def changeAlph(x: str):
    after_num = ord(x) + n

    if after_num > 90:
        after_num -= 26

    return chr(after_num)


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

afterS = list(map(changeAlph, s))

print("".join(afterS))

Solution (Python):
letters = [chr(ord('A') + i) for i in range(26)]
n = int(input())
s = input()
new_s = ""
for letter in s:
  new_idx = (letters.index(letter) + n) % 26
  new_s += letters[new_idx]

print(new_s)

Solution (Python):
N = int(input())
S = list(input())
for i in S:
    if ord(i) + N > ord('Z'):
        word = chr(ord(i)+N - ord('Z')+ord('A')-1)
    else:
        word=chr(ord(i)+N)
    print(word,end='')

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

lch = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dch = {}
ans = []

for i in range(len(lch)):
    dch[lch[i]] = i

for j in range(len(s)):
    ch = s[j]
    k = (dch[ch] + n) % 26
    ans.append(lch[k])

print("".join(ans))

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

alphabets = 'abcdefghijklmnopqrstuvwxyz'.upper()

for letter in S:
    index = alphabets.index(letter)
    if index + N > 25:
        new_index = index + N - 26
    else:
        new_index = index + N

    print(alphabets[new_index], end='')

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

new_s_list = [chr(ord(i)+N) if ord(i)+N <= 90 else chr(ord(i)+N-26) for i in s]

print("".join(new_s_list))

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

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

print(ans)

Solution (Python):
li='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N=int(input())
S=str(input())
ans=''
for i in range(len(S)):
  for j in range(len(li)):
    if S[i]==li[j]:
      if j+N<len(li):
        num=j+N
        ans+=li[num]
      elif j+N>=len(li):
        num=j+N-len(li)
        ans+=li[num]
print(ans)

Solution (Python):
N=int(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"]
S=list(input())
l2=l[N:]+l[:N]
for i in range(len(S)):
  j=l.index(S[i])
  S[i]=l2[j]
ans="".join(S)
print(ans)

Solution (Python):
n = int(input())
s = input()
for moji in s:
    o = ord(moji) + n
    if 90 < o:
        o = o -26
    print(chr(o), end="")

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

N %= 26

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

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

Solution (Python):

import sys

from string import ascii_uppercase as alphabet

alphabet = alphabet[-1] + alphabet[0:]

alpha_num = enumerate(alphabet, 0)

alpha_num = dict((alpha, num) for num, alpha in alpha_num)

def main():
    n, s = sys.stdin.read().split()
    n = int(n)

    t = ''
    for c in s:
        t += alphabet[(alpha_num[c] + n) % 26]
    
    print(t)


if __name__ == '__main__':
    main()

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

out = ''

for ss in s:
  for j,aa in enumerate(a):
    if ss == aa:
      out += a[(j+n) % 26]

print(out)

Solution (Python):
ALPHABET = range(ord('A'), ord('Z') + 1)


def enc(k, m):
    
    hira = list(m.encode("ascii"))  
    ango = hira.copy()  
    for i, code in enumerate(hira):
        offset = code - ALPHABET[0]  
        if 0 <= offset <= ALPHABET[-1]-ALPHABET[0]:  
            offset += k
            offset %= len(ALPHABET)
        ango[i] = offset + ALPHABET[0]  
    c = bytes(ango).decode("ascii")  
    return c


n = int(input())
s = input()
angobun = enc(n, s)
print(angobun)

Solution (Python):
import sys
sys.setrecursionlimit(1000000)
def solve():
  n = int(input())
  s = input()
  ans = ""
  for i in range(len(s)):
    temp = 0
    if ord(s[i])+n > 90:
      temp = 26
    ans += chr(ord(s[i])+n-temp)
  print(ans)
solve()

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

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

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


PLAIN = S


KEY = N


enc = ""

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

print(enc)

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

print(*S, sep='')

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

result = ""

for c in S:
    result = result + chr(abs(((ord(c) + n - ord('A')) % 26)) + ord('A'))

print(result)

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

for c in S:
    n = ord(c) + N
    if n > 90:
        R += chr(n - 26)
    else:
        R += chr(n)

print(R)

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

Solution (Python):
import string
upper = string.ascii_uppercase
upper *= 2

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

print(''.join(upper[upper.index(s) + N] for s in S))

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

ans = ''
for s in S:
    tmp = ord(s)
    if (tmp+N>=91):
        ans+= chr(tmp+N-91+65)
    else:
        ans+=chr(tmp+N)

print(ans)

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()
s = input()

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

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

Solution (Python):

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

r = []
for c in S:
  t = ord(c) + N
  if t >= 91:
    t -= 26
  r.append(chr(t))
print(''.join(r))

Solution (Python):
rot = int(input())
text = input()

text_int = [ord(x)+rot for x in text]
output = [chr(x) if x <= 90 else chr(x-26) for x in text_int]
print("".join(output))

Solution (Python):
N = int(input())
S = input()
letters = ['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'] * 3

ans = ''
for i in S:
    curidx = letters.index(i) + N
    ans += letters[curidx]
print(ans)

Solution (Python):
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math


n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
res = ''
for el in s:
    tmp = (ord(el)-65+n) % 26
    res += chr(tmp+65)

print(res)

Solution (Python):
import string
N = int(input())
S = input()
alp = [_ for i in range(2) for _ in string.ascii_uppercase]
ans = ""
for i, s in enumerate(S):
    ans += alp[alp.index(s) + N]

print(ans)

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

    ans = ""

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

if __name__ == '__main__':
    solve()

Solution (Python):


temp = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') 
n = int(input())
s = list(input())
result = ''

for c in s:
    index = temp.index(c)
    if index + n < len(temp):
        result += temp[index + n]
    else:
        result += temp[(len(temp) - (index + n)) * -1]
print(result)

Solution (Python):

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

tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

a_L = [val for val in tmp]
ans = ""
for val in s:
    i = a_L.index(val)
   
    if i+n >= 26:
        aa = i+n - 26
        
    else:
        aa = i + n
    
    ans += a_L[aa]
print(ans)

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

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

C = ''

for i in range(len(S)):
    index = alpha.find(S[i])
    index = (index+N)%26

    C += alpha[index]

print(C)

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

T = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
S2 = list(S)
T2 = list(T)

for i in range(len(S)):
    S2[i] = T2[int(T2.index(S2[i]) + N)]
print(''.join(S2))

Solution (Python):
N = ord('A')
M = ord('Z')

n = int(input())
S = input()
T = ""
for c in S:
    a = ord(c) + n 
    if a > M:
        a = a - M + N - 1
    T += chr(a)
    

print(T)

Solution (Python):


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

a = [chr(i) for i in range(65, 65+26)]

for i in range(len(S)):
    if(ord(S[i])+N <= 90):
        print(chr(ord(S[i])+N), end="")
    elif(ord(S[i])+N > 90):
        print( chr( 65 + N - (91-ord(S[i])) ), end="" )

Solution (Python):
n = int(input())
s = input()
a = []
for i in s:
    a.append(i)

for i in range(len(a)):
    a[i] = chr((ord(a[i]) + n - 65) % 26 +65)

for i in a:
    print(i, end='')

Solution (Python):
n=int(input())
s=list(input())
d=["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"]
c=[]
for i in s:
    h=d.index(i)
    h=h+n
    if h>=26:
        h=h-26
    c.append(d[h])
print("".join(c))

Solution (Python):
N = int(input())
S = str(input())
ans = ""
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(abc)):
        if S[i] == abc[j]:
            ans += abc[(j+N)%26]
            break
print(ans)

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

for ch in s:
    
    
    
    if xyz.find(ch)+n+1 > len(xyz):
        print(xyz[xyz.find(ch)+n-len(xyz)],end = "")
    else:
        print(xyz[xyz.find(ch)+n],end = "")

print("")

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

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

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

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2
s = ""
for i in S:
    for j in range(len(a)):
        if i == a[j]:
            s += a[j+N]
            break
print(s)

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

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

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


print("".join(ans).upper())

Solution (Python):


n=int(input())
s=input()
ans=[chr((ord(e)-65+n)%26+65) for e in s]
print(''.join(ans))

Solution (Python):
def getConverseCodes(args, n):
    converseCodes = ''
    for s in args:
        
        s = ord(s)
        s = s + n
        if s > 90:
          s = s - 26
        
        s = chr(s)
        converseCodes += s
    return converseCodes

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

print(getConverseCodes(S, N))

Solution (Python):
N=int(input())
S=str(input())
M=len(S)
T=''
Al='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(M):
  for j in range(26):
    if S[i]==Al[j]:
      T +=str(Al[j+N])
      break
print(T)

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

alf = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

res = ''

Slen = len(S)

for i in S:
    fd = alf.find(i)
    res += alf[(fd+N)%26]

print(res)

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

ans = str()

for s in S:
    if ord(s) + N > 90:
        ans += chr(ord('A') + N - (91-ord(s)))
    else:
        ans += chr(ord(s) + N)

print(ans)

Solution (Python):

n = int(input())
s = input()
total = ""
for i in s :
  i = ord(i)+n
  if 65+26 <= i : i = i-26
  total += chr(i)

print(total)

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

key = N
enc = ""

for char in list(S):
    ascii = ord(char)
    num = ascii - ord('A')
    num = (num + key) % 26
    ascii = num + ord('A')
    enc += chr(ascii)

print(enc)

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

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

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ss = input()
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']
ans = ''
for s in ss:
  ind = al.index(s)
  if ind + n >= 26:
    ans += al[ind + n - 26]
  else:
    ans += al[ind + n]
print(ans)

Solution (Python):
N=int(input())
s=input()
output = []
for cha in s:
    number = ord(cha) 
    number += N
    if(number > 90):
        number -= 26
    output_ = chr(number)
    print(output_,end="")

Solution (Python):
import sys
if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

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

ans = []
for s in S:
	if alphabet.find(s) > (25-N):
		ans.append(alphabet[alphabet.find(s)-(26-N)])
	else:
		ans.append(alphabet[alphabet.find(s)+N])

print(''.join(ans))

Solution (Python):
n=int(input())
s=input()
al=[chr(i) for i in range(65,65+26)]
n_list=[]
for i in s:
    n_list.append((al.index(i)+n)%26)

for i in n_list:
    print(al[i],end="")

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


abc = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
abc_map = {}
for i, c in enumerate(abc):
    abc_map[c] = i

sb = ''
for n in list(S):
    i = (abc_map[n] + N) % len(abc)
    sb += abc[i]

print(sb)

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

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
result = ""
for s_ in s:
  index = alpha.find(s_)
  i = n + index
  if i >= len(alpha):
    i -= len(alpha)
  result += alpha[i]
print(result)

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

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

tmp = ""
for val in S:
    tmp += num2alpha((alpha2num(val)+N)%26)
print(tmp)

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


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')))
    return "".join(ns)


print(caesar(S, -N))

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

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


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

ans = []
for x in S:
    i = alphabet.index(x)
    if i + N >= 26:
        ans.append(alphabet[i+N-26])
    else:
        ans.append(alphabet[i+N])

print(*ans, sep='')

Solution (Python):
n = int(input()) % 26
s = input()
res = ''
for i in s:
    if i.islower():
        c = chr(ord(i) + n)
        res += c if c.islower() else chr(ord(c) - 26)
    elif i.isupper():
        c = chr(ord(i) + n)
        res += c if c.isupper() else chr(ord(c) - 26)
    else:
        res += i
print(res)

Solution (Python):
n = int(input())
s = input()
al = [chr(i) for i in range(65, 91)]

ss = []
for i in range(len(s)):
	if n + ord(s[i]) - 65 < 26:
		ss.append(al[n + ord(s[i]) - 65])
	else:
		ss.append(al[n + ord(s[i]) - 91])
print("".join(map(str,ss)))

Solution (Python):
N=int(input())
S=list(input())
Alphabet=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Ans=[]
for i in S:
    Ans.append(Alphabet[(Alphabet.index(i)+N)%26])
print("".join([str(n) for n in Ans]))

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

ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
new = []
for c in S:
    for i in range(27):
        if c == ALPHA[i]:
            new.append(ALPHA[(i + N) % 26])
            break

print(''.join(new))

Solution (Python):
N = int(input())
S = list(input())
A_1 = ["Z","Y","X","W","V","U","T","S","R","Q","P","O","N","M","L","K","J","I","H","G","F","E","D","C","B","A"]
A_2 = {}
for i in range(len(S)):
    S[i] = A_1[A_1.index(S[i])-N]
print(''.join(S))

Solution (Python):
import os
import numpy as np

class getStdin(object):
    @classmethod
    def get_int(cls):
        return int(input())

    @classmethod
    def get_str(cls):
        return str(input())


if __name__ == '__main__':
    n = getStdin.get_int()
    s = getStdin.get_str()
    ss = ''
    for i in range(len(s)):
        x = ord(s[i]) + n
        if x >= 91:
            x = x - 26

        ss += chr(x)

    print(ss)

    os.sys.exit(0)