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

num2alpha = lambda c: chr(c+64)


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



for i in range(len(S)):
    S[i] = alpha2num(S[i]) 


def calc(n):
    return n + N 

S2 = list(map(calc, S))



for j in range(len(S)):
    S2[j] = S2[j] % 26
    if S2[j] == 0:
        S2[j] = 26
    S2[j] = num2alpha(S2[j])



S3 = "".join(S2)
print(S3)

Solution (Python):
from sys import stdin
num = int(stdin.readline().rstrip())
txt = stdin.readline().rstrip()
sum = lambda x: chr((ord(x)-ord('A')+num)%26+ord('A'))
print(''.join(map(sum, txt)))

Solution (Python):
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
N = int(input())
 
S = input()
A = []
 
for i in range(len(S)):
  B = AL.index(S[i])+N
  if B >= 26:
    B = B -26
  A.append(AL[B])
  
for j in range(len(S)):
  print(A[j], end='')

Solution (Python):
import sys
input = sys.stdin.readline
import numpy as np
base_list = 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'])
dict_list = []
dict_list.append(base_list)
for i in range(26):
    tmp_char = dict_list[i][0]
    tmp_list = dict_list[i][1:]
    tmp_list = np.append(tmp_list,tmp_char)
    dict_list.append(tmp_list)

def print_ans(N, sr):
    """Test Case
    >>> print_ans(2, ['A', 'B', 'C', 'X', 'Y', 'Z'])
    CDEZAB
    >>> print_ans(0, ['A', 'B', 'C','X', 'Y', 'Z'])
    ABCXYZ
    """
    idx_list = []
    for s in sr:
        tmp = np.where(base_list == s)[0]
        idx_list.append(int(tmp))
    ans = ''.join(dict_list[N][idx_list])
    print(ans)

if __name__ == '__main__':
    N = int(input().rstrip())
    tmp_s= input().rstrip()
    sr = []
    for s in tmp_s:
        sr.append(s)
    print_ans(N, sr)

Solution (Python):
n=int(input())
s=input()
l=s.lower()
ans=""
for i in list(l):
  asd=ord(i)
  num=asd-97
  num=(num+n)%26
  asd=num+97
  ans+=chr(asd)
print(ans.upper())

Solution (Python):
move_num = int(input())
input_char_str = input()

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

ans_char = ""
move_number = move_num
for input_char in input_char_str:
    if (char_list.index(input_char)+move_number) < len(char_list):
        ans_char += char_list[char_list.index(input_char)+move_number]
    else:
        char_index = (char_list.index(input_char)+move_number) - len(char_list)
        ans_char += char_list[char_index]
        
print(ans_char)

Solution (Python):

number=int(input())
moji=input()
moji_list=list(moji) 




moji_number=[]
moji_number=[ord(i) for i in moji_list]

moji_number_plus=[0 for i in moji_list]

for i in range(len(moji_number)):
    if moji_number[i]+number>90:
        moji_number_plus[i]=moji_number[i]+number-26
        
    else:
        
        
        moji_number_plus[i]=moji_number[i]+number



result=[]
result=[chr(i) for i in moji_number_plus]
result2=''.join(result)
print(result2)

Solution (Python):
SHIFT_COUNT = int(input())
encryptionStr = input()
result = ""
excludeStr = "{}_"

for c in encryptionStr :
    
    if excludeStr.find(c) != -1 :
        result = result + c
        continue

    
    if ord('a') <= ord(c) <= ord('z') :
        result = result + chr(abs(((ord(c) + SHIFT_COUNT - ord('a')) % 26)) + ord('a'))
    else :
        result = result + chr(abs(((ord(c) + SHIFT_COUNT - ord('A')) % 26)) + ord('A'))

print (result)

Solution (Python):
a = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
b = ''
e = int(input())

for c in list(input()):
  d = a.index(c)
  if d > 25 - e:
    d = d - (26)
    b += a[(d+e)]
  else:
    b += a[(d+e)]

print(b)

Solution (Python):
Alpha = [chr(i) for i in range(65, 91)]
N = int(input())
S = list(input())
New_S = []
for i in range(len(S)):
    p = Alpha.index(S[i]) + N
    if p >= 26:
        p = p - 26
    New_S.append(Alpha[p])

print(''.join(New_S))

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

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

print("".join(A))

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

ab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

dict = {}
for i, ab_ in enumerate(ab[:26]):
    dict[ab_] = i
ab2 = ab[n:n+26]
new = ''
for s_ in s:
    new += ab2[dict[s_]]
print(new)

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

abc = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") 
ans = []

for i in range(len(S)):
    index = abc.index(S[i])
    if index + N < 26:
        ans.append(abc[index + N])
    else:
        ans.append(abc[index + N - 26])
print("".join(ans))

Solution (Python):
n=int(input())
s=input().strip()
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
aa = dict()
for i, c in enumerate(a):
    aa[c] = i
def f(c):
    return a[(aa[c] + n)%26]

r = ''
for c in s:
    r += f(c)
print(r)

Solution (Python):

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

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

li = []
sli=list(S)
for i in range(len(S)):
    if(alpha2num(sli[i])+N<=26):
        li.append(alpha2num(sli[i])+N)
    if(alpha2num(sli[i])+N>26):
        li.append(alpha2num(sli[i])+N-26)

ans= []
for i in li:
    ans.append(num2alpha(i))

ansstr= ''
for x in ans:
    ansstr += x
print(ansstr)

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

mojiretsu = []
for moji in S:
    ord_moji = ord(moji) + N
    

    
    
    
    while ord_moji > 90:
        ord_moji = 64 + (ord_moji - 90)
    
    mojiretsu.append(chr(ord_moji))

ans = ''.join(mojiretsu)

print(ans)

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

Solution (Python):
n = int(input())
s = input()
l = list(s)
result = ''.join(map(lambda x : chr(((ord(x)+n) - 65) % 26 + 65), l))
print(result)

Solution (Python):
from string import ascii_uppercase

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


def gen(n):
    ret = {k: k for k in ascii_uppercase}
    for i, c in enumerate(ascii_uppercase):
        ret[c] = ascii_uppercase[(i + n) % len(ascii_uppercase)]
    return ret


table = gen(n)
ans = ""
for c in s:
    ans += table[c]
print(ans)

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

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

for i in range(len(s)):
    if l.index(s[i])+n>25:
        ans.append(l[l.index(s[i])+n-26])
    else:
        ans.append(l[l.index(s[i])+n])

for i in ans:
    print(i,end="")

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

Answer = ''
for i in range(len(S)):
  raworder = Alphabet.find(S[i])
  order = (raworder + N) % 26
  Answer += Alphabet[order]

print(Answer)

Solution (Python):
N = int(input())
strlist = list(str(input()))
for a in strlist:
  anum = ord(a)
  rot = anum + N if anum + N <= ord("Z") else anum + N - 26
  print(chr(rot), end="")

Solution (Python):
n = int(input())
s = list(input())
a = list()
for i in range(len(s)):
  a.append(chr((ord(s[i]) - ord('A') + n) % 26 + ord('A')))

print(*a, sep='')

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

alphabets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i in range(len(S)):
    for j in range(26):
        if S[i] == alphabets[j]:
            t = j
            if t + N <= 25:
                ans_lis.append(alphabets[t + N])
            else:
                ans_lis.append(alphabets[t + N - 26])

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

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

Solution (Python):
import string
from collections import deque

deq = deque(string.ascii_uppercase)
lis = list(string.ascii_uppercase)


N = int(input())
str_ = list(input())
deq.rotate(-N) 

mem = list()
for s in str_:
  i = lis.index(s)
  mem.append(deq[i])
  
print("".join(mem))

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

Alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
d = 0
k = ""

for i in range(len(S)):
    d = N + int(Alpha.find(S[i]))

    while(d >= len(Alpha)):
        d = d - len(Alpha)

    k = k + Alpha[d]

print(k)

Solution (Python):
a=int(input())
s=list(input())
t=[]
list=[chr(i) for i in range(65, 65+26)]
for i in s:
  t.append(list.index(i))
u=[i+a for i in t]
u=[i-26 if i>=26 else i for i in u]
b=[]
for i in u :
  b.append(list[i])
k=""
for s in b:
  k+=s
print(k)

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

alfa=list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

for i in s:
  for j in range(26):
    if i==alfa[j]:
      ans+=alfa[j+n]
print(ans)

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


Alphabet = ["None","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 char in S:
    char_position = Alphabet.index(char)
    added_num = char_position + N
    if added_num > 26:
        added_num = added_num % 26
    if added_num == 0:
        added_num = 26
    changed_char = Alphabet[added_num]
    ans = ans + changed_char

print(ans)

Solution (Python):
N = int(input())
S = input()
L = len(S)
adic ={"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}
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","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(L):
  s = S[i]
  val = adic[s]
  key = val + N
  if key>26:
    key -= 26
  else:
    key = key
  print(alist[key-1],end="")

Solution (Python):
N=int(input())
S=str(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']
play=''
for j in range(len(S)):
    for i, let in enumerate(letters):
        if S[j]==let and i+N < len(letters):
            play+=letters[i+N]
        elif S[j]==let and i+N >= len(letters):
            play+=letters[N-len(letters)+i]
print(play)

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alphabet_list = [ch for ch in alphabet]

def get_alphabet_num(chr):
    global alphabet
    global alphabet_list
    num = 0
    for i in range(len(alphabet)):
        if chr == alphabet_list[i]:
            num = i
            break
    return num

N = int(input())
input_str = input()

list = [''] * len(input_str)

for i in range(len(input_str)):
    input_num = get_alphabet_num(input_str[i]) + N
    if input_num > 25:
        input_num -= 26
    list[i] = alphabet_list[input_num]
    input_num = 0

list = ''.join(list)
print(list)

Solution (Python):
import numpy as np
s = [input() for i in range(2)]
N = int(s[0])
S = list(s[1])
eng = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
idx = np.array([eng.index(S[i]) for i in range(len(S))])
N_l = np.array([N]*len(S))
new_idx = idx + N_l
ans = [eng[i] for i in new_idx]
fin_ans = ''
for x in ans:
    fin_ans += x
print(fin_ans)

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


KEY = N


enc = ""

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

print(enc)

Solution (Python):
N=int(input())
S=list(input())
ans=""
for i in S:
    neword=ord(i)+N
    if neword>90:neword-=26
    ans+=chr(neword)
print(ans)

Solution (Python):
N = int(input())
S = input()
AZ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for c in S:
    print(AZ[(AZ.index(c)+N) % len(AZ)], end="")

Solution (Python):
n = int(input().strip())
s = input().strip()
ansarray = []
for i in range(len(s)):
    if s[i] == 'A':
        snum = 1
    if s[i] == 'B':
        snum = 2
    if s[i] == 'C':
        snum = 3
    if s[i] == 'D':
        snum = 4
    if s[i] == 'E':
        snum = 5
    if s[i] == 'F':
        snum = 6
    if s[i] == 'G':
        snum = 7
    if s[i] == 'H':
        snum = 8
    if s[i] == 'I':
        snum = 9
    if s[i] == 'J':
        snum = 10
    if s[i] == 'K':
        snum = 11
    if s[i] == 'L':
        snum = 12
    if s[i] == 'M':
        snum = 13
    if s[i] == 'N':
        snum = 14
    if s[i] == 'O':
        snum = 15
    if s[i] == 'P':
        snum = 16
    if s[i] == 'Q':
        snum = 17
    if s[i] == 'R':
        snum = 18
    if s[i] == 'S':
        snum = 19
    if s[i] == 'T':
        snum = 20
    if s[i] == 'U':
        snum = 21
    if s[i] == 'V':
        snum = 22
    if s[i] == 'W':
        snum = 23
    if s[i] == 'X':
        snum = 24
    if s[i] == 'Y':
        snum = 25
    if s[i] == 'Z':
        snum = 26
    if snum + n <= 26:
        ansnum = snum + n
    else:
        ansnum = (snum + n) - 26
    if ansnum == 1:
        ansarray.append('A')
    if ansnum == 2:
        ansarray.append('B')
    if ansnum == 3:
        ansarray.append('C')
    if ansnum == 4:
        ansarray.append('D')
    if ansnum == 5:
        ansarray.append('E')
    if ansnum == 6:
        ansarray.append('F')
    if ansnum == 7:
        ansarray.append('G')
    if ansnum == 8:
        ansarray.append('H')
    if ansnum == 9:
        ansarray.append('I')
    if ansnum == 10:
        ansarray.append('J')
    if ansnum == 11:
        ansarray.append('K')
    if ansnum == 12:
        ansarray.append('L')
    if ansnum == 13:
        ansarray.append('M')
    if ansnum == 14:
        ansarray.append('N')
    if ansnum == 15:
        ansarray.append('O')
    if ansnum == 16:
        ansarray.append('P')
    if ansnum == 17:
        ansarray.append('Q')
    if ansnum == 18:
        ansarray.append('R')
    if ansnum == 19:
        ansarray.append('S')
    if ansnum == 20:
        ansarray.append('T')
    if ansnum == 21:
        ansarray.append('U')
    if ansnum == 22:
        ansarray.append('V')
    if ansnum == 23:
        ansarray.append('W')
    if ansnum == 24:
        ansarray.append('X')
    if ansnum == 25:
        ansarray.append('Y')
    if ansnum == 26:
        ansarray.append('Z')
ans = ''
for j in range(len(s)):
    ans = ans + ansarray[j]
print(ans)

Solution (Python):
from fractions import gcd
from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7


def main():
    n = int(input())
    s = list(input())
    
    
    
    
    for i in range(len(s)):
        s[i] = chr(ord("A") + (ord(s[i]) - ord("A") + n)%26)
    print("".join(map(str,s)))

    
    

    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        

        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    



    

    

    


if __name__ == '__main__':
    main()

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

answer = []
newN = N % 26
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in S:
  for num, j in enumerate(alp):
    if i == j:
      k = num + newN
      k = k % 26
      answer.append(alp[k])
      break
answer2 = ''.join(answer)
print(answer2)

Solution (Python):
n = int(input())
s = list(map(ord,list(input())))
s = list(map(lambda x: ((x+n-65)%26+65), s))

ans = ''
for ss in s:
  ans += chr(ss)

print(ans)

Solution (Python):
n=int(input())
s=input()
ns=""
for c in s:
	if ord(c)+n<=ord("Z"):
		ns+=chr(ord(c)+n)
	else:
		ns+=chr(ord(c)+n-ord("Z")+ord("A")-1)
print(ns)

Solution (Python):

a = int(input())


S = str(input())

chr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
SS = []

for k in range(len(S)):
    for j in range(len(chr)):
        if S[k] == chr[j]:
            if (j+a) >= 25:
                SS += chr[j+a-26]
            else:
                SS += chr[j+a]

SS = ''.join(SS)

print(SS)

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


S = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans=""

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

print(ans)

Solution (Python):
N = int(input())
S = list(input())
alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
S_2=[]
for s in S:
    if alphabet.index(s)+N <= len(alphabet)-1:
        index = alphabet.index(s)+N
        S_2.append(alphabet[index])
    else:
        index = alphabet.index(s)+N - len(alphabet)
        S_2.append(alphabet[index])
print(''.join(S_2))

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

ans = []


str_list = list(s)

for j in range(len(str_list)):
  temp = ord(str_list[j])+n
  if temp >= 91:
    temp = temp-26
  ans.append(chr(temp))


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

Solution (Python):
def main():
    alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    n = len(alpha)
    s2i = {}
    i2s = {}
    for i, s in enumerate(alpha):
        s2i[s] = i
        i2s[i] = s

    N = int(input())
    S = input()
    w = ''.join([i2s[(s2i[s] + N) % n] for s in S])
    print(w)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
temp = 0
ans = ""
for i in input():
    temp = ord(i)
    if temp + N >= 65 + 26:
        temp = temp - 26
    ans += chr(temp + N)
print(ans)

Solution (Python):

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

def slide_chr(s,n):
    return chr(((ord(s)+n)-65)%26 + 65)

s = [slide_chr(i,n) for i in s]
print("".join(s))

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

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

ans = []
for i in s:
    if (ord(i)-65+n) > 25:
        ans.append(list[ord(i)-65 -25 + n-1])
    else:
        ans.append(list[ord(i)-65 +n])

print("".join(ans))

Solution (Python):
N=int(input())
S=input()
a=list(S)
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"]
SS2=[]
for i in range(len(a)):
    x=alpha.index(a[i])
    SS2.append(x)
 
for j in range(len(SS2)):
    SS2[j]+=N
 
SS3=[]
for k in range(len(SS2)):
    y=alpha[SS2[k]]
    SS3.append(y)
 
moji="".join(SS3)
print(moji)

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

Solution (Python):
N=int(input())
str=input()
ordnum=0
ans=""
for i in str:
  ordnum=ord(i)+N
  if (ordnum>=91):
    ordnum=ordnum-26
  ans=ans+chr(ordnum)
print(ans)

Solution (Python):
n=input()

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

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"]
length=len(s)
export=""
for i in range(length):
    num=list.index(s[i])
    num=(num+int(n))%26
    export+=list[num]
    
export=export.upper()
print(export)

Solution (Python):
n=int(input())
s=str(input())
a=""
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"]
for car in s:
  for alp in l:
    if car == alp:
      a = a + l[l.index(alp)+n]

print(a[0::2])

Solution (Python):
n=int(input())
l=[]
pos={}
for i in range(ord('A'),ord('Z')+1):
  l.append(chr(i))
  pos[chr(i)]=len(l)-1
for i in input():
  print(l[(pos[i]+n)%26],end="")

Solution (Python):
import string

offset = int(input())

H   = {}
rH  = {}

n = len(string.ascii_uppercase)
for i, c in enumerate(string.ascii_uppercase):
    H[c] = i
    rH[(i-offset+n) % n] = c

st = input().strip()
for c in st:
    print(rH[H[c]], end = '')

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

ls_a = [0]*len(ls_s)

for i in range(len(ls_s)):
    num_si = ord(ls_s[i])
    if num_si + n <= 90:
        num_ai = num_si + n
    else:
        num_ai = 64 + (num_si + n) % 90
    ls_a[i] = chr(num_ai)

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

Solution (Python):
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","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()
S2=[]

for s in list(S):
    for i in range(26):
        if alf[i]==s:
            s=alf[i+N]
            S2.append(s)
            s="a"

tmp=""
for i in S2:
    tmp+=i
print(tmp)

Solution (Python):
n=int(input())
s=input()
a=0
m=""
c=[chr(i) for i in range(65,65+26)]
for x in s:
  t=ord(x)-65
  a=n+t
  if 25<a:
    a-=26
  m+=c[a]
print(m)

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()
M =len(S)
S = list(S)
def f(a):
    if a == "A":
        a = "B"
    elif a == "B":
        a = "C"
    elif a == "C":
        a = "D"
    elif a == "D":
        a = "E"
    elif a == "E":
        a = "F"
    elif a == "F":
        a = "G"
    elif a == "G":
        a = "H"
    elif a == "H":
        a = "I"
    elif a == "I":
        a = "J"
    elif a == "J":
        a = "K"
    elif a == "K":
        a = "L"
    elif a == "L":
        a = "M"
    elif a == "M":
        a = "N"
    elif a == "N":
        a = "O"
    elif a == "O":
        a = "P"
    elif a == "P":
        a = "Q"
    elif a == "Q":
        a = "R"
    elif a == "R":
        a = "S"
    elif a == "S":
        a = "T"
    elif a == "T":
        a = "U"
    elif a == "U":
        a = "V"
    elif a == "V":
        a = "W"
    elif a == "W":
        a = "X"
    elif a == "X":
        a = "Y"
    elif a == "Y":
        a = "Z"
    elif a == "Z":
        a = "A"
    return a

for i in range(M):
    if N != 0:
        for j in range(N):
            S[i] = f(S[i])

print(''.join(S))

Solution (Python):

N = int(input())
S = []
S = input()

alphabets = []
for alphabet in range(ord('A'), ord('Z')+1):
    alphabets.append(chr(alphabet))


ans_list = []
for i in S:
    num = alphabets.index(i)
    position = num + N
    if position > 25: 
        position -= 26 
    ans_list.append(alphabets[position])

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

Solution (Python):
def change_str(moto_str):
    global Nnew
    global str_list
    global change_list

    for i in range(len(change_list)):
       if change_list[i] == moto_str:
            num = i+Nnew
            if num > 25:
                num = num - 26
    return change_list[num]

Nnew = int(input())
str = input()
str_list = list(str)
change_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(str_list)):
    str_list[i] = change_str(str_list[i])


print(*str_list,sep='')

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

al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
step = []
for i in al:
    step.append(i)
    

string = []
for i in S:
    for j in range(26):
        if (i == step[j]): 
            if ((j+N)<26) : string.append(step[j+N])
            else : string.append(step[j+N-26])
            
Ans = ''.join(string)
print(Ans)

Solution (Python):
al=[chr(ord('A') + i) for i in range(26)] * 2
N = int(input())
S = str(input())
s_list = []
for s in S:
    s = al[ord(s) - 65 + N]
    s_list.append(s)
s_list
print("".join(s_list))

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

a1 = [(ord(i) + N) for i in S]
a2 = [chr(i-26) if i>90 else chr(i) for i in a1]
a3 = [str(a) for a in a2]
L="".join(a3)
print(L)

Solution (Python):
import string


def get_input():

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

    return N, S


def convert(S, N):

    count = string.ascii_uppercase.index(S) + N
    count = count % 26

    return string.ascii_uppercase[count]


def main():

    N, S = get_input()

    res = []
    for s in S:
        res.append(convert(s, N))

    print(''.join(res))


main()

Solution (Python):
N = int(input())
S = input()
s_list = list(S)
al_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
str_list = []
for w in s_list:
    str_list.append(al_list[(al_list.index(w) + N) % 26])
print(''.join(str_list))

Solution (Python):
import sys
input_num = int(input())
input_str = str(input())

for i in input_str:
    chr_ord = ord(i) + input_num
    if chr_ord > 90:
        chr_ord -= 26
    print(chr(chr_ord),end="")

Solution (Python):

n = int(input())
s = input()
az = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
answer = ""
for i in range(len(s)):
    for j in range(int(len(az)/2)):
        if s[i] == az[j]:
            answer += az[j+n]
print(answer)

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

L = list(S)

O = []

for i in range(len(L)):
  O.append(ord(L[i]))

for i in range(len(L)):
  O[i] = O[i] + N
  if O[i] > 90:
    a = O[i] - 90
    O[i] = 64 + a

R = []

for i in range(len(L)):
  R.append(chr(O[i]))

for i in range(len(L)-1):
  R[0] = R[0] + R[i+1]







print(R[0])

Solution (Python):
input = [input() for i in range(2)]
N = int(input[0])
S = input[1]

alpha_dict = {}
alpha_dict_rev = {}
for i,c in enumerate(range(ord('A'),ord('Z')+1)):
    alpha_dict[chr(c)] = i
    alpha_dict_rev[i] = chr(c)
    
S_digit = ''
for i in range(0,len(S)):
    S_digit += str(alpha_dict_rev[(alpha_dict[S[i]]+N)%26])

print(S_digit)

Solution (Python):
def change_code(moji, num):
  new_code = ord(moji) + num
  if new_code > 90:
    new_code -= 26
  return chr(new_code)

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

for _ in range(len(s)):
  s_num.append(n)

change_s = map(change_code, s, s_num)
print(''.join(list(change_s)))

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

    L=[]
    Slen = len(S)
    for i in range(Slen):
        tmp = ord(S[i]) + N
        if tmp <= 90:
            L.append(chr(tmp))
        if tmp > 90:
            tmp = tmp - 26
            L.append(chr(tmp))
    ans = ''.join(L)
    print(ans)
resolve()

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

for s in S:
    ix = ( A.index(s) + N ) % 26 
    Y.append(A[ix])

print(''.join(Y))

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

Solution (Python):
N = int(input())
S = input()
S_list = list(S)
AR = [chr(ord("A") + i) for i in range(26)]

for i in range(len(S_list)):
    for j in range(26):
        if str(S_list[i]) == str(AR[j]):
            if j + N >= 26:
                S_list[i] = AR[j + N - 26]
                break
            else:
                S_list[i] = AR[j + N]
                break
S = "".join(S_list)
print(S)

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

low = s.lower()
plain = ''

for i in list(low):
    ASCII = ord(i)
    num = ASCII - 97
    num = (num + n) % 26
    ASCII = num + 97
    plain += chr(ASCII)

print(plain.upper())

Solution (Python):
t=int(input())
s=input()
s1=''
for i in s:
    if((ord(i)+t)>90):
        a=(ord(i)+t)-90
        if(a==1):
            s1+=chr(ord('A')+a-1)
        else:
            s1+=chr(ord('A')+a-1)
    else:
        s1+=chr(ord(i)+t)
print(s1)

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

s = list(S)

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

result = ''
for i in s:
    num = dict1[i] + N
    if num > 26:
        num -= 26
    key = dict2[num]
    result += key

print(result)

Solution (Python):
if __name__ == "__main__":
	N = int(input())
	S = list(str(input()))
	

	al = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
	for i in range(0,len(S)):
		if al.index(S[i]) + N > 25:
			
			index = al.index(S[i])
			S[i] = al[index + N - 26]
		else:
			index = al.index(S[i])
			S[i] = al[index+N]
	print(''.join(map(str, S)))

Solution (Python):

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

chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for s in S:
    alt_idx = chars.index(s) + N
    ans += chars[alt_idx]
print(ans)

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

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

Solution (Python):
n=int(input())
s=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"]
l=len(s)
u=[]
for j in range(l):
    u.append(s[j])
for k in range(l):
    for h in range(26):
        if u[k]==alp[h]:
            u[k]=alp[(h+n)%26]
            break    
for b in range(l):
    print(u[b], end="")

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

import string
alphabet = list(map(chr, range(ord('A'), ord('Z')+1)))

ans = ''
for s in S:
  a = list(map(chr, range((ord(s)+N-ord('A')) % 26 + ord('A'),
                          (ord(s)+N-ord('A')) % 26 + ord('A')+1)))
  ans = ans + a[0]
print(ans)

Solution (Python):
def main():
    N = int(input())
    S = input()
    S = S.lower()
    ans = []
    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",
    ]

    for I in range(len(S)):
        X = A.index(S[I])
        if X + N >= 26:
            X = X - 26
        ans.append(A[X + N])

    answer = "".join(ans)
    answer = answer.upper()

    print(answer)


if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
S=input()
chars=list(S)
lista=[chr(ord(x)+N) if ord(x)+N < 91 else chr(ord(x)+N-26) for x in chars]
listb=''.join(lista)
print(listb)

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"]
ans = str()

for i in s:
    for j in range(len(al)):
        if i == al[j] and j + n < len(al):
            ans += al[j+n]
        elif i == al[j] and j + n > len(al)-1:
            ans += al[abs(len(al)-j-n)]

print(ans)

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

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

abc =list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
rot = []
for s in S:
    for a in abc:
        if s == a:
            r = abc.index(a) + N
            if r >= 26:
                r = r - 26 
            rot.append(abc[r])
print("".join(rot))