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

r = ''
for i in range(len(S)):
    r += chr(ord('A') + (((ord(S[i]) + N) - ord('A')) % 26))

print(r)

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:
  index = alphabet.index(s)
  new_index = index + N if index + N < 26 else index + N - 26
  ans += alphabet[new_index]
print(ans)

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

alfa = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
count = len(S)
for i in range(0, count, 1):
    cmd = alfa.find(S[i])
    ans += alfa[cmd + N]
print(ans)

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

def shift_char(ch, num):
  z_ord = ord('Z')
  num_ord = ord(ch) + num 
  if num_ord > z_ord:
    num_ord -= 26
  return chr(num_ord)

for i in range(len(S)):
  S[i] = shift_char(S[i], n)
print(''.join(S))

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):
from functools import reduce


def do_code():
    rot = int(input())
    str = input()
    table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ans = reduce(lambda red, s: red + table[(table.index(s) + rot) % 26], str[:], "")
    print(ans)


if __name__ == '__main__':
    do_code()

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

Solution (Python):


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

res = ""
for i in S:
    if ord(i)+N > 90:
        res += chr(ord(i)+N-26)
    else:
        res += chr(ord(i)+N)
        
print(res)

Solution (Python):
def b_rot_n(): 
    N = int(input())
    S = input()
    for znaczek in S: 
        if ord(znaczek)+N <= ord('Z'):
            print(chr(ord(znaczek)+N),end='')
        else: 
            print(chr(ord(znaczek)+N - 26), end='')
    print('')
b_rot_n()

Solution (Python):
n = int(input())
s = list(input())
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"]
ABC2 = ABC*3
answer = []
for i in s:
    k = ABC.index(i)
    answer.append(ABC2[k+n])

print("".join(answer))

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

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

Solution (Python):
i= int(input())
s = input()
en = ['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 = [(en[(en.index(k)+i)%26]) for k in s]
print(''.join(s_list))

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

Solution (Python):
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N = int(input())
S = input()
result = ""

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

print(result)

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

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

print(ans)

Solution (Python):
N=int(input())
S=input().split()
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_list=list(*S)

new_Sindex=(alphabet.index(S_list[0])+N)%26

new_S=""
for i in range(len(S_list)):
  new_Sindex=(alphabet.index(S_list[i])+N)%26
  new_S+=alphabet[new_Sindex]

print(new_S)

Solution (Python):
def main():
    n = int(input())
    s = list(map(ord, input()))

    for z in s:
        r = n+z
        if r > 90:
            r = r % 90 + 64
        print(chr(r), end='')
    print()

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
t = input()
S = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
shift = [S[(S.index(c)+n)%26] for c in t]
print(''.join(shift))

Solution (Python):

def main():
    N = int(input())
    S = input().rstrip()
    ans = "".join([chr(65 + (ord(ch) + N - 65) % 26) for ch in S])
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

def main(N, S):
    base = ord('A')
    res = ''.join(chr((ord(s) - base + N) % 26 + base) for s in S)
    print(res)


if __name__ == "__main__":
    N = int(input(''))
    S = input('')
    main(N, S)

Solution (Python):


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

res = ""
for i in S:
    if ord(i)+N > 90:
        res += chr(ord(i)+N-26)
    else:
        res += chr(ord(i)+N)
        
print(res)

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

str = list(input())

out = []

for st in str:
    num = ord(st) + N
    if num >= 91:
        num = num - 26
    out.append(chr(num))

print("".join(out))

Solution (Python):
N = int(input())
S = input()
out = ""
A = ord("A")
Z = ord("Z")
for s in S:
  if ord(s)+N > Z:
    out += chr(ord(s)+N-Z+A-1)
  else: 
    out += chr(ord(s)+N)
print(out)

Solution (Python):
import string
l=string.ascii_uppercase
N=int(input())
S=input()
T=""
for i in range(len(S)):
  for j in range(26):
    if S[i]==l[j]:
      T+=l[(j+N)%26]
      break
print(T)

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

Solution (Python):
min_abc = ord('A')
max_abc = ord('Z')
n = int(input())
s = input()
result=[]
for c in s:
    ascii_c = ord(c) + n
    if(ascii_c > max_abc):
        ascii_c = (min_abc-1) + (ascii_c-max_abc)
    result.append(chr(ascii_c))
print("".join(result))

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

for i in S:
    buf=ord(i)+N
    if buf>90:
        buf-=26
    print(chr(buf),end="")
print("")

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

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

Solution (Python):
n=int(input())
s=list(input())
out_str=''
for i in s:
  m=ord(i)+n
  if m>90:
    m-=26
  out_str+=chr(m)

print(out_str)

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

for i in range(len(S)):
    tmp = ord(S[i])+N
    if(tmp>90):
        tmp -= 26
    print(chr(tmp),end='')

print('')

Solution (Python):
n = int(input());
s = input();
st = '';

for c in s:
	st = st+chr(((ord(c) - ord('A')) + n)%26 + ord('A'));

print(st);

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

Solution (Python):
N = int(input())
for s in input():
  print(chr(65+(ord(s)-65+N)%26),end="")

Solution (Python):
def rot_n(c, n):
    if 'a' <= c and c <= 'z':
        return chr((ord(c) - ord('a') + int(n)) % 26 + ord('a'))

    if 'A' <= c and c <= 'Z':
        return chr((ord(c) - ord('A') + int(n)) % 26 + ord('A'))

    return c

def rot(s, n):
    g = (rot_n(c, n) for c in s)
    return ''.join(g)


N = int(input())
s = input()
print(rot(s, N))

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

output = ''
for i in range(len(S)):
	tmp = ord(S[i])+N
	if tmp > 90:
		tmp = tmp - 90 + 64
	output += chr(tmp)

print(output)

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

T = [chr((ord(s)-65 + N)%26 + 65) for s in S]

print("".join(T))

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

Solution (Python):
SHIFT_COUNT = int(input())
word = input()
result = ""

for s in word:
    if ord('a') <= ord(s) <= ord('z'):
        result = result + \
            chr(abs(((ord(s) + SHIFT_COUNT - ord('a')) % 26)) + ord('a'))
    else:
        result = result + \
            chr(abs(((ord(s) + SHIFT_COUNT - ord('A')) % 26)) + ord('A'))

print(result)

Solution (Python):
s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
input_s = input()
print(''.join([s[(s.index(c)+n) % 26] for c in input_s]))

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

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

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

l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = []

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

print(''.join(ans))

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

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

print(Ans)

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
a = ''
for item in S:
  a_index = alphabet.index(item) + N
  if a_index > 25:
    a_index = a_index - 26
  a += alphabet[a_index]
print(a)

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

for s in S:
    num = ord(s) + N
    if 90 < num:
        print(chr(num - 26), end='')
        continue
    print(chr(num), end='')

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

ans = ""
for c in s:
    ans += alphabet[(n + alphabet.index(c)) % 26]

print(ans)

Solution (Python):
import sys
N = int(input())
S = input()
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
for s in S:
    sys.stdout.write(alp[ord(s) - 65 + N])

Solution (Python):
n = int(input())
s = input()
ans = ""
 
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
for c in s:
	ans += alphabet[(n + alphabet.index(c)) % 26]
    
print(ans)

Solution (Python):


N=int(input())

S=input()


def getShiftedStr(args,num):
    ConverseCode=''
    for i in args:
        t=ord(i)
        t+=num
        if t>90:
            t-=26
        new=chr(t)
        ConverseCode+=new
    print(ConverseCode)


getShiftedStr(S,N)

Solution (Python):
n = int(input())
s = input()
alph_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in s:
    pos =alph_list.find(i)
    print(alph_list[n+pos],end="")

Solution (Python):
n = int(input())
s = input()
alphabet_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
alphabet_dict = {alphabet_list[i]:i for i in range(26)}
ans = ""
for ss in s:
    ans += alphabet_list[(alphabet_dict[ss] + n) % 26]
print(ans)

Solution (Python):
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
result = ''
for i in range(len(S)):
	pos = 0
	pos = alpha.find(S[i])
	result += alpha[(pos+N)%26]
print(result)

Solution (Python):
import string

number = int(input())
strings = input()

alphabetlist = string.ascii_uppercase

res = ''

for i, j in enumerate(strings):
    res += alphabetlist[(alphabetlist.find(j)+number) % len(alphabetlist)]

print(res)

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

N=int(input())

S=list(input())

while(N>=26):
    N-=26


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

print("".join(S))

Solution (Python):
str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 

a = int(input())
s = list(input())

ans = ''
for char in s:
    
    c = str.index(char) + a 

    if c >= 26:
        c = c - 26
    ans = ans + str[c] 

print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
 



 




 


 





 


 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    S = input()
    S = S[:-1]
    
    ans = ""
    for i in S:
        No = ord(i) + N
        if No > 90:
            No = No - 90 + 64
        tmp = chr(No)
        ans += tmp
    
    print(ans)
    
    
if __name__ == "__main__":
	main()

Solution (Python):
N=int(input())
S=input()
T='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
S2=''
for i in range(len(S)):
    n=T.find(S[i])
    if n+N<=25:
        S2=S2+T[n+N]
    else:
        S2=S2+T[n+N-26]
print(S2)

Solution (Python):
N = int(input())
S = input()
P = []
for_represent = []
for i in range(len(S)):
    if ord(S[i]) + N > 90:
        temp = (ord(S[i]) + N) - 90
        P.append(chr(65 + (temp - 1)))
    else:
        P.append(chr(ord(S[i]) + N))
P = "".join(map(str, P))
print(P)

Solution (Python):
N=int(input().strip())
S=input().strip()
import string
SS=string.ascii_uppercase+string.ascii_uppercase
ans=""
for s in S:
    ans+=SS[SS.index(s)+N]
print(ans)

Solution (Python):
abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

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

for i, j in enumerate(s):
    num = abc.index(j)
    newnum = num+n
    s[i] = abc[newnum]

print(''.join(s))

Solution (Python):
n = int(input())
s = input()
print(''.join([chr(65+(ord(t)+n)%65%26) for t in s]))

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

Solution (Python):

N = int(input())
S = input()
 
str_list = list(S)
str_trsf = []
 
for item in str_list:
    str_trsf.extend(chr(N - (ord('Z') - ord(item) + 1) + ord('A')) if ord(item) + N > ord('Z') else chr(ord(item) + N))

print(''.join(str_trsf))

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

def alp_number(char):
    return ord(char) - ord('A')

def num_to_char(num):
    return chr(num + ord('A'))

ord_chars = [(alp_number(char) + n) % 26 for char in s]

answer = ''.join([num_to_char(num) for num in ord_chars])

print(answer)

Solution (Python):
n=int(input())
s=input()
max_code=ord('Z')
converted = ''

for item in s:
    code = ord(item)
    code += n
    if code > max_code:
        code -= 26
    converted = converted + chr(code)

print(converted)

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

for i in range(len(s)):
  if (ord(s[i]) + n <= ord('Z')):
    result = result + chr(ord(s[i]) + n)
  else:
    result = result + chr(ord(s[i]) + n - 26)

print(result)

Solution (Python):
n = int(input())
s = input()
sl = list(s)
alp = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
ans = []
for i in range(len(sl)):
    num = n + alp.index(sl[i])
    if num < 26:
        ans.append(alp[num])
    else:
        ans.append(alp[num - 26])
print(''.join(ans))

Solution (Python):
n = int(input())
s = input()
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alpha_dict = {}
res = ""
for idx, letter in enumerate(alphabet):
    alpha_dict.setdefault(letter, idx)
for char in s:
    tmp = alpha_dict[char] + n
    if tmp >= 26:
        res += alphabet[tmp - 26]
    else:
        res += alphabet[tmp]
print(res)

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

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

r = ""
for s in S:
    r += chr((ord(s)+N-65) % 26 + 65)

print(r)

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


s = list(S)
s_new =[]
for i in range(len(S)):
    if ord(s[i])+N<91:
        s[i] = chr(ord(s[i])+N)
        s_new.append(s[i])
    else:
        s[i] = chr(ord(s[i])+N-26)
        s_new.append(s[i])
print(''.join(s_new))

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

out = []
for i in range(len(s)):
    if ord(s[i])+n <= 90:
        out.insert(i, chr(ord(s[i])+n))
    else:
        out.insert(i, chr(ord(s[i])-26+n))

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

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

string = list(map(lambda x:ord(x)+n,string))


for e in string:
    if e <= 90:
        print(chr(e),end="")
    else:
        print(chr(e-26),end="")

Solution (Python):
N = input()
S = input()
li = list(S)
ans = []
alp = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in range(len(li)):
  k = alp.index(li[i]) + int(N)
  if k < 26:
    ans.append(alp[k])
  else:
    ans.append(alp[k-26])
 
print(''.join(ans))

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

offset = ord('A')


def transform(c):
    code = ord(c)
    return chr((code - offset + n) % 26 + offset)


print(''.join(transform(c) for c in s))

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

for c in S:
  id = ALPHA.index(c)
  id = (id+N) % 26
  newc = ALPHA[id]
  new_sent += newc
  
print(new_sent)

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

for i in range(len(S)):
    if a.index(S[i]) + N > 25:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)

Solution (Python):
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = input()
S = input()

shaffle = ''

for i in S:
  current = letters.index(i)
  current += int(N)
  if current >= len(letters):
    current -= 26
  shaffle += letters[current]

print(shaffle)

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

str = ''
for i in b:
    if ord(i) + a > ord('Z'):
        n = chr(((ord(i)+a)%ord('A'))-ord('Z')+2*ord('A')-1)
    else:
        n = chr(ord(i)+a)

    str = str + n

print(str)

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

def main():
  N = int(input())
  S = input()
  
  newS = ""
  for letter in S:
    num = order(letter, alphabet)
    new_order = (num + N) % 26
    newS += alphabet[new_order]
  print (newS)
    
def order(letter, alphabet):
  for i in range(len(alphabet)):
    if letter == alphabet[i]:
      return i

if __name__ == "__main__":
  main()

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

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 i in range(0,len(S)):
  tmp = alphabet.index(S[i])
  tmp = (tmp + N) % 26
  
  
  ans = ans + alphabet[tmp]

print(ans)

Solution (Python):


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

slide = N % 26
ans = ""

for i in S:
    moji = (ord(i) + slide) % 91
    if moji < 65:
        moji += 65
    else:
        pass
    ans += chr(moji)
    
print(ans)

Solution (Python):

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




for c in S:
    cd = ord(c) + N
    if cd > 90:
        cd -= 26
    print(chr(cd), end="")
print()

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


N = int(N)
Len = len(S)
LIST = list(S)

ANSWER = ""

for SS in LIST:
    NUNBER = ord(SS)
    NUNBER = NUNBER -65
    AFFTER = NUNBER + N
    LAST  = AFFTER % 26
    LAST  = chr(LAST+65)
    ANSWER = ANSWER + LAST
    
print(ANSWER)

Solution (Python):
N = int(input())
S = input()
s = ''
for i in range(len(S)):
    if ord(S[i])+N > 90:
        s += chr(ord(S[i])+N-26)
    else:
        s += chr(ord(S[i])+N)
print(s)

Solution (Python):
N=int(input()) % 26
L=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']
NUM=range(0,len(ALP))
ALP_NO = dict(zip(ALP,NUM))
PLUS_ALP=ALP[N:] + ALP[:N]
ANS=''
for s in L:
  NUM = ALP_NO[s]
  ANS += PLUS_ALP[NUM]
print(ANS)

Solution (Python):

N = int(input())
s = input()

alef = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for letter in s:
    new_idx = (alef.index(letter) + N) % 26
    print(alef[new_idx], end="")

Solution (Python):
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
s = input()
ans = ''
for i in s:
        pos = alph.index(i)
        ans += alph[pos + n]
print(ans)

Solution (Python):
n = int(raw_input())
ss = raw_input()

abc = [x for x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

strs = []
for s in ss:
    idx = (abc.index(s) + n) % len(abc)
    x = abc[idx]
    strs.append(x)
print ''.join(strs)

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

Solution (Python):
N = int(input())
S = input()
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
w = ""
for x in S:
    if abc.index(x) + 1 + N > 26:
        w += abc[abc.index(x) + N - 26]
    else:
        w += abc[abc.index(x) + N]
print(w)

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

codec = ['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']
result = ''
for _s in s:
    result += codec[(codec.index(_s) + n) % 26]

print(result)

Solution (Python):
N = int(input())
S = input()
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
w = ""
for x in S:
    if abc.index(x) + 1 + N > 26:
        w += abc[abc.index(x) + N - 26]
    else:
        w += abc[abc.index(x) + N]
print(w)

Solution (Python):
import string

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

up_s = string.ascii_uppercase

def caesar(s, shift_num):
    index = up_s.index(s)
    shifted_index = index + shift_num

    if shifted_index <= 25:
        return up_s[shifted_index]
    
    else:
        return up_s[shifted_index - 26]


print(''.join([caesar(s, N) for s in S]))

Solution (Python):
n = int(input())
s = input()
alphaList  =   ["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"]
moji = ""
for str in s:
    index = alphaList.index(str)
    addNum = index + n
    if addNum >25:
        addNum = addNum - 26 
    moji = moji + alphaList[addNum]
print(moji)

Solution (Python):
num = int(input())
s = input()
res = ""
for x in s:
    loc = ord(x) + num
    res += chr(loc - 26 if loc > 90 else loc)
print(res)

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

import string
ss = string.ascii_uppercase

d = {}
for i, x in enumerate(ss):
    d[x] = (i + n) % len(ss)

ans = ''
for i in s:
    ans += ss[d[i]]    
print(ans)

Solution (Python):
dict = ['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_str = ''
S = int(input())
strs = input()
 
for x in strs:
  new_idx = (dict.index(x)+S)%26
  new_str += str(dict[new_idx])
  
print(new_str)

Solution (Python):
n, s = [input() for i in range(2)]

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



t = ""
for i in s:
    
    found = False
    j = 0
    while j<26 and found == False:
        if i == l[j]:
            t += l[j+int(n)]
            
            found = True
        j += 1
print(t)

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

N = input() 
S = input() 

ans = ""
for s in S:
    ans += l[(l.index(s)+int(N))%26]

print(ans)

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

import numpy as np

al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

S_index = np.array([al.index(i) for i in S])
T_index = S_index + N

T = [al[i%26] for i in T_index]

T = "".join(T)

print(T)

Solution (Python):
N = int(input())
S = input()
a = [chr(i) for i in range(65, 65+26)]
result = ""
for s in S:
    result += a[(N+a.index(s))%26]
print(result)

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    S = input()
    al=[chr(ord('A') + i) for i in range(26)]
    ans = ''
    for s in S:
        ans += al[(N+al.index(s))%26]
    print(ans)

Solution (Python):
n=int(input())
s=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']
c_list=list(s)
next_s=list()

for c in c_list:
    for i in range(len(alph)):
        if c==alph[i]:
            if i+n>25:
                next_s.append(alph[i+n-26])
                break
            else:
                next_s.append(alph[i+n])
                break

mojiretu = ''

for x in next_s:
    mojiretu += x

print(mojiretu)

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

A="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
B={}
for i in range(len(A)):
    B[A[i]]=i

C=[]
for i in range(len(S)):
    C.append((B[S[i]]+int(N))%26)


D={}
for i in range(len(A)):
    D[i]=A[i]

E=[]
for i in range(len(C)):
    E.append(D[C[i]])



muramatu =''

for x in E:
    muramatu += x

print(muramatu)

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

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

Solution (Python):
i = int(input())
s1 = input()
s = list(s1)
ans  = []

for k in range(len(s1)):
    a = ord(s1[k])
    
    b = a + i
    
    if b > 90:
        b = b - 26
    ans.append(chr(b))

print(''.join(ans))

Solution (Python):
KEY=int(input())
PLAIN = input()
enc = ""

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

print(enc)

Solution (Python):
N = int(input())
S = input()
int_A = 65
letters = 26
nums = [ord(char) for char in S]
nums = [(num - int_A + N) % letters for num in nums ]
print(''.join([chr(num + int_A) for num in nums]))

Solution (Python):
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']
ALP = ['']*26
for i in range(26):
    ALP[i] = alp[i].upper()

N = int(input())
S = input()
T = ''
for i in range(len(S)):
    tmp = ALP.index(S[i])
    tmp = (tmp + N) % 26
    T += ALP[tmp]
print(T)

Solution (Python):
n=int(input())
s=input()
a=list(s)
for i in range(len(s)):
    a[i]=chr(ord(a[i])+n)
    if ord(a[i])>ord('Z'):
        a[i]=chr(ord(a[i])-26)

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

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

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

	
for i in range(0, len(s)):
	b = s[i]
	x = abc.index(b) + n
	while x > 25:
		x = x - 26	
	y = abc[x]
	s = list(s)
	s[i] = y
	s = ''.join(s)
print(s)

Solution (Python):
n = int(input())
s = list(input())
k = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
  s[i] = k[(k.index(s[i])+n)%len(k)]
s_change = "".join(s)
print(s_change)

Solution (Python):
n = int(input())
s = input()
moji = [(ord(i) - ord("A") + n)%26 + ord("A") for i in s]
ans = "".join(list(map(chr, moji)))
print(ans)

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

ans = ""
for _s in s:
    offset = (ord(_s)-ord("A")+n)%26
    ans += chr(ord("A")+offset)
print(ans)

Solution (Python):
num = int(input())
base_str = input()
alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
            'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
            'U', 'V', 'W', 'X', 'Y', 'Z']
def replacer(letter, num):
    letter_index = alphabets.index(letter)
    return(alphabets[(letter_index+num)%26])
answer = []
for i in range(len(base_str)):
    answer.append(replacer(base_str[i], num))
answer = ''.join(answer)
print(answer)

Solution (Python):
N = int(input())
s = input()
rot=[]
for line in s:
   rot.append(chr((ord(line)-ord('A') + N)%26+ord('A')))
print("".join(rot))

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    s = str(readline().rstrip().decode('utf-8'))
    ls = {i - 65: chr(i) for i in range(65, 91)}
    ans = []
    for i in range(len(s)):
        ans.append(ls[(ord(s[i]) - 65 + n) % 26])
    print("".join(ans))
    

if __name__ == '__main__':
    solve()

Solution (Python):
n=int(input())
S=input()
A='ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2
T=''
for s in S:
	T+=A[A.index(s)+n]
print(T)

Solution (Python):
n=int(input())
s=input()
alp='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
s_n=''
for i in s:
    s_n+=alp[(alp.index(i)+n)%26]
print(s_n)

Solution (Python):
n = int(input())
s = list(input())
l = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
a = []

for i in s:
  t = l.index(i)+n
  if t < 26:
    a.append(l[t])
  else:
    a.append(l[t-26])

print("".join(a))

Solution (Python):
def shiftText(plain_text, key):
    plain_text.lower
    encoded_text = ""
    for i in plain_text:
        char = ord(i)+key
        if (char > 90):
            char -= 26
            encoded_text += chr(char)
        else:
            encoded_text += chr(char)
    return encoded_text


key = int(input())
plain_text = input()

print(shiftText(plain_text, key))

Solution (Python):
import sys
sys.setrecursionlimit(10000000)

from bisect import *
from collections import *
from heapq import *
import functools
import itertools
import math
INF = float('inf')
MOD = 10**9+7

AtoZ = [chr(i) for i in range(65,65+26)]
ItoC = defaultdict(str)
for i, x in enumerate(AtoZ):
    ItoC[x] = i

N = int(input())
S = input()
T = ''
for x in S:
    T += AtoZ[(ItoC[x]+N)%26]
print(T)

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']
buf = ''
for i in range(len(S)) :
    buf += alpha[(alpha.index(S[i]) + N) % 26]
print(buf)

Solution (Python):
N = int(input())
S = list(map(ord, (str(input()))))


def Plus(x):
    x += N
    while(x>=91):
        x=64+(x%90)
    return x

print(''.join(list(map(chr, (list(map(Plus, S)))))))

Solution (Python):
N=int(input())
S=list(str(input()))
ans=''
az={}
az_dic={}
for i in range(65,65+26):
    az[chr(i)]=i-65
    az_dic[i-65]=chr(i)
    

for p in S:
    c = (az[p]+N) % 26
    ans += az_dic[c]


print(ans)

Solution (Python):
lst = [chr(i) for i in range(65, 65+26)]*2
N = int(input())
S = input()
for i in S:
    print(lst[lst.index(i)+N],end = "")

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

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

Solution (Python):
N = int(input())
S = input()
A = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
    res = A.index(S[i]) + N
    if res >= 26:
        res -= 26
    print(A[res], end = '')

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

for i in S:
    l.append(i)

l = [ord(i) for i in l]     
newl = []
for i in l:
    if i + N >= 91:
        i = i - 26 + N
    else:
        i += N
    newl.append(i)

newl = [chr(i) for i in newl]
newl = ''.join(newl)
print(newl)

Solution (Python):
a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
b={0:'A',1:'B',2:'C',3:'D',4:'E',5:'F',6:'G',7:'H',8:'I',9:'J',10:'K',11:'L',12:'M',13:'N',14:'O',15:'P',16:'Q',17:'R',18:'S',19:'T',20:'U',21:'V',22:'W',23:'X',24:'Y',25:'Z'}
c={'A':0,'B':1,'C':2,'D':3,'E':4,'F':5,'G':6,'H':7,'I':8,'J':9,'K':10,'L':11,'M':12,'N':13,'O':14,'P':15,'Q':16,'R':17,'S':18,'T':19,'U':20,'V':21,'W':22,'X':23,'Y':24,'Z':25}
n=int(input())
s=input()
for i in range(len(s)):
    z=c[s[i]]
    z+=n
    if z>25:
        z-=26
    print(b[z],end="")
print()

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

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'
Alphabet = Alphabet.split(',')

for i in range(0, len(S)):
    for q in range(0, 26):
        if S[i] == Alphabet[q]:
            if q + N > 25:
                S[i] = Alphabet[q + N - 26]
            else:
                S[i] = Alphabet[q + N]
            break

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