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

ans = ''
for i in s:
    ans = ans + ls[(ls.index(i) + n) % 26]

print(ans)

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

print(a)

Solution (Python):
n = int(input())
s = str(input())
c = list(s)
answer = ""

for ch in c:
    if 'A' <= ch <= 'Z':
            answer += chr((ord(ch) - ord('A') + int(n)) % 26 + ord('A'))
print(answer)

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

Solution (Python):
N = int(input())
S = input()
ans = ""
for i in range(len(S)):
    ch = ord(S[i])+N
    if ch > ord('Z'): ch -= (ord('Z')-ord('A')+1)
    ans += chr(ch)
print(ans)

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

an = ord("A")

print("".join([chr((ord(c) - an + n) % 26 + an) for c in s]))

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

output = []
for character in inn:
    number = ord(character) - 96
    output.append(number)
import numpy as np
x=np.array(output)
a=x+n
num2alpha = lambda c: chr(c+96)
y=[]
for i in range(len(a)):
	if a[i]>=-5:
		a[i]-=26
	
	y.append(chr(int(a[i])+96))

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

Solution (Python):
N = int(input())
S = input()
L = ""
def f(a):
    return chr((ord(a)+N)%90 + 64) 
  
for i in range(len(S)):
    if ord(S[i])+N>90:
        s = f(S[i])
    else:
        s = chr(ord(S[i])+N)
    L += s

print(L)

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


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

ans = []
for character in S:
  try:
    num = alpha2num(character)
    new_num = (num + N) % 26
    if new_num == 0:
      new_num = 26
    new_chr = num2alpha(new_num)
    ans.append(new_chr)
  except:
    break

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

Solution (Python):
N = int(input())
S = list(input())
for i in range(len(S)):
  S[i] = ord(S[i])+N
  if S[i] > 90:
    S[i] -= 26
for j in range(len(S)):
  S[j] = chr(S[j])
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 = input()

ans = ''
for i in S:
    tmp = alpha2num(i)
    if tmp + N <= 26:
        ans += num2alpha(tmp+N)
    else:
        ans += num2alpha(tmp+N-26)

print(ans)

Solution (Python):
n = int(input())
s = input()
ls = list(s)
la = [chr(i) for i in range(65, 65+26)]
lind = []
for i in range(len(s)):
    for j in range(len(la)):
        if ls[i] == la[j]:
            lind.append(la.index(la[j]))
            break
lans = [la[lind[i]-26+n] for i in range(len(s))]
ans = ''.join(lans)
print(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"]
new=""

for i in range(len(s)):
    if(l.index(s[i])+n >=26):
        num=l.index(s[i])+n-26
    else:
        num=l.index(s[i])+n
    new=new[:]+ l[num]
print(new)

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

char_after_n = {}


def get_nth_ascii(original_ascii, n):
    NUM_ASCII = 26
    c = original_ascii + (n % NUM_ASCII)
    if c > ord('Z'):
        return c - NUM_ASCII
    return c



for c in range(ord('A'), ord('Z') + 1):
    char_after_n[c] = get_nth_ascii(c, N)

for mapped_char in map(lambda s: chr(char_after_n[ord(s)]), S):
    print(mapped_char, end="")

Solution (Python):
n = int(input())
s = list(input())
n %= 26
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','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

m = len(s)

for i in range(m):
	for j in range(26):
		if s[i] == alphabets[j]:
			s[i] = alphabets[j+n]
			break
s = ''.join(s)
print(s)

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

for i in range(0,len(S)):
  for j in range(0,len(L)):
    if S[i] == L[j]:
      print(L[j-len(L)+N],end='')
      break

Solution (Python):



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


for i in range(len(s)):
    if(ord(s[i])+n>90):
        print(chr(ord(s[i])+n-26), end="")
    else:
        print(chr(ord(s[i])+n), end="")

Solution (Python):


import math
import itertools


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

dic = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = ""
for i in range(len(S)) :
  for j in range(len(dic)) :
    if S[i] == dic[j] :
      ans += dic[j+N]
      break

print (ans)

Solution (Python):
n=int(input())
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')))
		elif ('a' <= ch and ch <= 'z'):
			ns.append(chr((ord(ch) - ord('a') - n) % 26 + ord('a')))
		elif ('0' <= ch and ch <= '9'):
			ns.append(chr((ord(ch) - ord('0') - n) % 10 + ord('0')))
		else:
			ns.append(ch)
	return "".join(ns)

result = caesar(S, -n)
print(result)

Solution (Python):
from __future__ import print_function


import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )



import random


def main():
    n = int(input())
    S = input().strip()
    SS=""
    SX="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    
    
    for i in range(len(S)):
        
        
        
        
        chrcode =  (ord(S[i]) + n) if (ord(S[i]) + n)<=90  else (ord(S[i]) + n)%91 + 65
        
        SS+= chr(chrcode)
    print(SS)
    return

if __name__ == '__main__':
    main()

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

S_list = list(S)
ans = ""

for i in range(len(S_list)):
    for j in range(len(A_list)):
        if S_list[i] == A_list[j]:
            if (j + N) > 25:
                ans += A_list[j + N - 26]
            else:
                ans += A_list[j + N]

print(ans)

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

ans = ''

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','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(abc)):
        if s[i] == abc[j]:
            ans += abc[j + n]
            break
        
print(ans)

Solution (Python):

import sys
from itertools import product
from collections import Counter, defaultdict
from string import ascii_uppercase as ABC

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

N = int(input())
S = input()
ans = []
for s in S:
    ans.append(ABC[(ord(s)-65+N)%26])
print("".join(ans))

Solution (Python):
N = int(input().rstrip())
S = input().rstrip()
new_str = ''
for a in list(S):
    ascii_code = ord(a) + N
    ascii_code = (ascii_code - 26) if ascii_code > 90 else ascii_code
    new_str += chr(ascii_code)
print(new_str)

Solution (Python):
N = int(input())
S = input()
MOJI0='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
MOJI1=MOJI0[N:N+26]
ans=[]
for i in range(len(S)):
    pos=MOJI0.find(S[i])
    ans += MOJI1[pos]
ans = ''.join(ans)
   
print(ans)

Solution (Python):
N = int(input())
S = str(input())
def rot(s, num):
    ans = []
    for i in range(len(s)):
        temp = ord(s[i])
        if 65 <= temp + num <= 90:
            ans.append(chr(temp + num))
        else:
            ans.append(chr(65 + (temp + num) - 91))
    temp_ans = "".join(ans)
    return temp_ans
print(rot(s = S, num = N))

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

str = input()

arr = ["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 = ""

str_arr = list(str)

length = len(str_arr)

for i in range(length):
  a = str_arr[i]
  b = arr.index(a)
  c = b + N
  ans = ans + arr[c]
  
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','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

ans =[]

for i in range(len(S)):
    for j in range(26):
        if S[i] == alpha[j]:
            ans.append(alpha[j+N])

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

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


ll=[]
leng=len(l)

for i in range(leng):
    t=l[i]
    tt=(ord(t)-ord('A')+1+n)%26
    if tt==0:
        tt+=26
    ttt=chr(tt+64)
    ll.append(ttt)
print(*ll,sep='')

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

n_s = ""

for c in s:
    add = n
    c_num = ord(c) - 64
    if(n % 26 == 0):
        n_s += c
    else:
        if(c_num + n > 26):
            add = (c_num + n) % 26
            n_s += chr(add + 64)
        else:
            n_s += chr(c_num + add + 64)

print(n_s)

Solution (Python):

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

moji_list = []

q, mod = divmod(N, 26)
for i in range(len(S)):
  if (ord(S[i])+mod) <= 90:
    moji_list.append(chr(ord(S[i]) + mod))
  else:
    moji_list.append(chr(ord(S[i]) + mod - 26))
    
  
print("".join(moji_list))

Solution (Python):
N = int(input())
S = str(input())
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
S_new=[]
for i in S:
    S_new.append(alphabet[(alphabet.index(i)+ N)%26] )
print(''.join(S_new))

Solution (Python):
n =int(input())
s = list(map(str,input()))
l=[]
for i in range(len(s)):
    if ord(s[i])>=91-n:
        l.append(chr((ord(s[i])-26+n)))
    else:
        l.append(chr((ord(s[i])+n)))

print(''.join(l))

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

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

for i in S:
    box.append(string.index(i) + N)


for i in box:
    print(string[i], end="")

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

ans = [0]*len(s)
for i in range(len(s)):
    S = s[i]
    key = (alphabet.index(S))
    ans[i] = alphabet[(key+n)%26]
print("".join(ans))

Solution (Python):

N = int(input())
S = input()
ans = []
for i, c in enumerate(S):
    num = ord(c) + N
    if num > ord('Z'):
        num -= 26
    ans.append(chr(num))
print(''.join(ans))

Solution (Python):
X = int(input())
A = input()

char_list = list(A)

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

for item in char_list:
    num = alpha2num(item)+X
    if num > 26: 
       char = char + num2alpha(num-26)
    else:
       char = char + num2alpha(num)

print(char)

Solution (Python):





import numpy as np

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

ords = np.array([ord(x) for x in s])
after_ords = ords + n
after_ords[after_ords >= 91] = after_ords[after_ords >= 91] + 6
print(str.upper(''.join([chr(a) for a in after_ords])))

Solution (Python):
n = int(input())
s = list(input())
alpha = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
i = 0
while i < len(s):
  j = 0
  while j < 26:
    if s[i] == alpha[j]:
      s[i] = alpha[j+n]
      break
    else:j += 1
  i += 1

k = 0
while k < len(s) :
  print(s[k],end ="")
  k += 1

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

word1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
word2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''

for i in range(len(S)):
    for j in range(len(word1)):
        if S[i]==word1[j]:
            ans = ans + word2[j+N]
            
print(ans)

Solution (Python):
n = int(input())%26
alp = list(input())

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

for i in range(0,len(alp)):
    num.append(alpha2num(alp[i]))
    num[i]+=n
    if num[i]>26:
        num[i]=num[i]-26
    alp[i]=num2alpha(num[i])

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

Solution (Python):
import string
import numpy as np

alist=np.asarray(list(string.ascii_uppercase)) 
N=int(input()) 
S=input() 
O="" 


for s in S:
    aconv=alist[(np.where(alist==s)[0][0]+N)%26] 
    O+=aconv 

print(O)

Solution (Python):
L="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n=int(input())
s=input()
i=0
for j in s:
    print(s.replace(j,L[(L.index(j)+n)%26])[i],end="")
    i += 1

Solution (Python):
N = int(input())
S = 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']
Slist = list(S)

i = 0
j = 0

while i < len(Slist):
    while j < len(al):
        if Slist[i] == al[j]:
            if j+N > len(al)-1:
                Slist[i] = al[j+N-26]
                break
            Slist[i] = al[j+N]
            break
        j += 1
    i += 1
    j = 0

Sprint = ''.join(Slist)

print(Sprint)

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

for e,i in enumerate(string):
    val = ord(str(i)) + n
    if (val > 90):
        val = 64 + (val - 90)
    string[e] = chr(val)
mojiretu = ''
for x in string:
    mojiretu += x
    
print(mojiretu)

Solution (Python):
import numpy as np
N = input()
N = int(N)
S = input()
S = list(S)
data = np.array(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O",
                 "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"])

out = ""
for i in range(len(S)):
  idx = np.where(data == S[i])[0]
  out += data[int((idx + N) % 26)]

print(out)

Solution (Python):


n = int(input().rstrip())
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 , alphabet_name in enumerate(s):
    s[i] = alphabet[ (alphabet.index(s[i])) +n]
    
print("".join(s))

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"]
temp = []
ans = ""

for i in range(len(S)):
    su = L.index(S[i])+N
    if su >=26:
        su -= 26
    temp.append(su)
for j in range(len(S)):
    ans += L[int(temp[j])]
    
print(ans)

Solution (Python):
def rot_n(c, n):
	if "A" <= c and c <= "Z":
		return chr((ord(c) - ord("A") + int(n)) % 26 + ord("A"))

def rot(s, n):
	c = (rot_n(c, n) for c in s)
	print("".join(c))


n = int(input())
s = input()
rot(s, n)

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

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

for i in range(len(S)):
    for j in range(len(l)):
        if l[j] == S[i]:
            if (j + N) < 26:
                O.append(l[j+N])
            else:
                O.append(l[j+N-26])

string="".join(O)
print(string)

Solution (Python):
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

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

for i in range(len(s)):
    for j in range(len(li)):
        if s[i] == li[j]:
            memo = j
            break
    s[i] = li[(j+n)%26]

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

Solution (Python):
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']
n = int(input())
s = input()
ans =[]
for i in s:
  num = al.index(i)
  num = (num + n ) % 26
  ans.append(al[num])
p=''.join(ans)
print(p)

Solution (Python):
list = [chr(i) for i in range(65, 65+26)]

x = int(input())
list_before = input()

list_after = []
count = 0

for i in list_before:
    count = int(list.index(i)) + x
    while count >= 26:
        count -= 26

    list_after.append(list[count])

moji = ''.join(list_after)
print(moji)

Solution (Python):
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"]
size = len(ALPHABETS)
N = input()
S = input()
converted = map(lambda x: ALPHABETS[(ALPHABETS.index(x) + int(N)) % size], list(S))
print(''.join(converted))

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

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

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)

ans = []
for i in range(len(s_list)):
    num_ = alpha2num(s_list[i])
    if (num_ + n) %26 != 0:
        ans.append(num2alpha(num_ + n))
    else:
        ans.append('Z')

ans_str = ''

if n == 0:
    for i in range(len(s_list)):
        ans_str += s_list[i]
    print(ans_str)
else:
    for i in range(len(ans)):
        ans_str += ans[i]
    print(ans_str)

Solution (Python):
Num=int(input())
String=input()
Library=[['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]]
newstring=''
for i in String:
    for j in range(0,26):
        if i==Library[j][0]:
            oldstring=newstring
            newstring=oldstring+Library[(j+Num)%26][0]
print(newstring)

Solution (Python):
kotae=[]
N = int(input())
Sst=input()
S = list(Sst)
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','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']

for i in range(len(Sst)):
    for j in range(26):
        if S[i] == L[j]:
            kotae.append(L[j+N])

Sed = "".join(kotae)
print(Sed)

Solution (Python):
N = int(input())
S = input()
H = ""
A = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

if(N==0):
  print(S)
else:
  for i in range(len(S)):
    for j in range(26):
      if(S[i]==A[j]):
        H += A[j+N]
  print(H)

Solution (Python):
n=int(input())
s=input()
l="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=""
for i,j in enumerate(s):
  ides=l.find(j)
  if ides+n>25:
    ides-=26
  
  ans+=l[ides+n]
print(ans)

Solution (Python):
import sys

N = int(input())
S = input()
RES = ''

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

print(RES)

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"]
b=[["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","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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
   ["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"],
  ]
c=[]
for i in  range(len(s)):
    cnt=a.index(s[i])
    c.append(str(b[cnt][n%26]))
for i in range(len(s)):
    print(c[i],end="")

Solution (Python):

import sys
import re

def solve(N: int, S: str):
    dic_original = ["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 S:
        s_r = dic_original[(dic_original.index(s) + N) % 26]
        ans += s_r

    print(ans)

def main():
    N = int(input())
    S = str(input())
    solve(N, S)

if __name__ == '__main__':
    main()

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

lst = [chr(ord('a') + i) for i in range(26)]
lst_up = list(map(str.upper,lst))

for i in range(len(S)):
    if int(lst_up.index(S[i])+N+1) <= len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N]
    elif  int(lst_up.index(S[i])+N+1) > len(lst_up):
        S[i] = lst_up[lst_up.index(S[i])+N-26]

lst_2 = "".join(S)
print(lst_2)

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

outS = ""
for i in range(len(S)):
    ASCII = ord(S[i])
    ASCII += N
    if ASCII > 90:
        ASCII = 65  + int(ASCII % 91)
    outS += chr(ASCII)
print(outS)

Solution (Python):
N = int(input())
S = input()
alphas = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
for s in S:
  i = alphas.index(s)
  print(alphas[i+N], end='')

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

a = []
for i in s:
    a.append(chr((ord(i)+n-ord("A"))%26+ord("A")))
print("".join(a))

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


s=[]
for i in range(len(S)):
    s.append(S[i])



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

number=[]
for i in s:
    number.append(alphabet.index(i)+N)


for i in number:
    ans=alphabet[i%26]
    print(ans,end="")

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

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

O = "".join(ns)
print(O)

Solution (Python):
N=int(input())
S=input()
Z='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
List=[]
y=0
for i in range(len(S)):
  for j in range(len(Z)):
    if S[i]==Z[j]:
        y=Z[(j+N)%26]
    else:
        pass

  List.append(y)

a=List[0]
for i in range(1,len(S)):
    a=a+List[i]
    
print(a)

Solution (Python):
def NumToAlph(n):
    num=n%26
    if num==0:
        num=26
    if num==1:
        return 'A'
    elif num==2:
        return 'B'
    elif num==3:
        return 'C'
    elif num==4:
        return 'D'
    elif num==5:
        return 'E'
    elif num==6:
        return 'F'
    elif num==7:
        return 'G'
    elif num==8:
        return 'H'
    elif num==9:
        return 'I'
    elif num==10:
        return 'J'
    elif num==11:
        return 'K'
    elif num==12:
        return 'L'
    elif num==13:
        return 'M'
    elif num==14:
        return 'N'
    elif num==15:
        return 'O'
    elif num==16:
        return 'P'
    elif num==17:
        return 'Q'
    elif num==18:
        return 'R'
    elif num==19:
        return 'S'
    elif num==20:
        return 'T'
    elif num==21:
        return 'U'
    elif num==22:
        return 'V'
    elif num ==23:
        return 'W'
    elif num ==24:
        return 'X'
    elif num==25:
        return 'Y'
    else:
        return 'Z'

def AlphToNum(alph):
    if alph=='A':
        return 1
    elif alph=='B':
        return 2
    elif alph=='C':
        return 3
    elif alph=='D':
        return 4
    elif alph=='E':
        return 5
    elif alph=='F':
        return 6
    elif alph=='G':
        return 7
    elif alph=='H':
        return 8
    elif alph=='I':
        return 9
    elif alph=='J':
        return 10
    elif alph=='K':
        return 11
    elif alph=='L':
        return 12
    elif alph=='M':
        return 13
    elif alph=='N':
        return 14
    elif alph=='O':
        return 15
    elif alph=='P':
        return 16
    elif alph=='Q':
        return 17
    elif alph=='R':
        return 18
    elif alph=='S':
        return 19
    elif alph=='T':
        return 20
    elif alph=='U':
        return 21
    elif alph=='V':
        return 22
    elif alph=='W':
        return 23
    elif alph=='X':
        return 24
    elif alph=='Y':
        return 25
    else:
        return 26
        
N=int(input())
S=str(input())
T=''
for c in range(len(S)):
    T=T+NumToAlph(AlphToNum(S[c])+N)
print(str(T))

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


n = int(input())
s = input()
ans = []

for i in list(s):
    ans.append(rot13(i, n))

print(''.join(ans))

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

l = list(string.ascii_uppercase)

for i,s in enumerate(S):
  index = l.index(s)
  if index + N >= len(l):
    index = index + N - len(l)
    new_s = l[index]
  else:
    new_s = l[index+N]
  S[i] = new_s

S = ''.join(S)
print(S)

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

l = list(s)

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

ans = []

for _ in l:
  num = alpha2num(_) + n
  if num > 26:
    num -= 26
  ans.append(num)

ans2 = [num2alpha(_) for _ in ans]

print(''.join(ans2))

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

cs = ""


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

print(cs)

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

ans = []
for i in range(len(s)):
    idx = ord(s[i]) + n
    if idx > 90 :
        idx = ord("A") + idx - 91
    ans.append(chr(idx))
print("".join(ans))

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

b = []
for i in range(len(s)):
    for j in range(len(a)):
        if s[i]==a[j]:
            s[i] = a[(j+n)%26]
            break
print(''.join(s))

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

ord_list = []

for i in range(len(S)):
	tmp = ord(S[i])
	ord_list.append(tmp)

ans_num_list = []

for i in range(len(S)):
	if ord_list[i] + N <= 91:
		ans_num_list.append(ord_list[i] + N)
	else:
		ans_num_list.append(ord_list[i] + N - 26)

ans_list = [chr(i) for i in ans_num_list]

ans_list2 = []

for i in range(len(ans_list)):
	if ans_list[i] == "[":
		ans_list2.append("A")
	else:
		ans_list2.append(ans_list[i])

print("".join(ans_list2))

Solution (Python):
import sys


import math
from fractions import gcd
from collections import deque
import bisect

sys.setrecursionlimit(10000)


def main():
    
    
    N = int(input())
    S = input()
    ret = ''
    for c in S:
        c_rep = chr(((ord(c)+N) - 65) % 26+65)

        ret = ret + c_rep
    print(ret)  


if __name__ == "__main__":
    main()

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

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)

for i in range(len(S)):
    a = alpha2num(S[i])
    a=a+N
    while a>26:
        a=a-26
    S[i]=num2alpha(a)

print(''.join(S))

Solution (Python):
N = int(input())
S = input()
str_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"]
str_list2 = str_list + str_list
for iter, i in enumerate(S):
    num = str_list.index(i)
    new_str = str_list2[num+N]
    if iter == 0:
        ans = new_str
    else:
        ans += new_str
print(ans)

Solution (Python):
def judge(S,N):
    a = [x for x in list(S)]
    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"]
    mak = []
    llst = lst + lst
    for i in range(len(a)):
        for j in range(26):
            if a[i]==llst[j]:
                mak.append(llst[j+N])
    print("".join(mak))

N = int(input())
S = input()
judge(S,N)

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

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

Solution (Python):
num = int(input())
al = input()

newal = ""
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(al)):
  if(alp.index(al[i])+num>25):
    newal = newal + alp[(alp.index(al[i])+num)-26]
  else:
    newal = newal + alp[alp.index(al[i])+num]
  
print(newal)