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()
T = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
TT = {}
for i,t in enumerate(T):
  i+=N
  TT[t] = T[i%26]

ss = []
for s in S:
  ss.append(TT[s])
print("".join(ss))

Solution (Python):
import string


def resolve():
    n = int(input())
    s = input()
    l = string.ascii_uppercase * 2
    a = ""
    for i in s:
        a += l[l.index(i) + n]
    print(a)


if __name__ == '__main__':
    resolve()

Solution (Python):
import sys

input = sys.stdin.readline


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

        ans = ''
        for c in S:
            ans += chr(((ord(c) - 65) + N) % 26 + 65)
        print(ans)



if __name__ == '__main__':
    AtCoder().main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()
ans = []
for s in S:
	ans.append(ascii_uppercase[(ascii_uppercase.index(s)+N)%26])
print(*ans, sep="")

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

result = ""
for i in range(0, len(s)):
    tmp = ord(s[i])+n
    while 0x40+26 < tmp:
        tmp -= 26
    result += chr(tmp)

print(result)

Solution (Python):
n=int(input())
s=input()
l='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in s:
  for j in range(26):
    if i==l[j]:
      ans+=str(l[j+n])
print(ans)

Solution (Python):
n = int(input())
s = list(input())
al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res = []
for si in s:
    i = ord(si)-65
    i = (i+n)%26
    res.append(al[i])

print(''.join(res))

Solution (Python):
def f(alp, num):
  LI = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
  return LI[LI.find(alp)+num]

N = int(input())
S = input()
ans = ""
for i in S:
  ans += f(i,N)
  
print(ans)

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

abc="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

L=len(S)

for i in range(L):
    idx=abc.index(S[i])
    ans=ans+abc[idx+N]

print(ans)

Solution (Python):
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 2
n = int(input())
s = input()

ans = ''
for ch in s:
  ans += a[a.find(ch)+n]
print(ans)

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

    return "".join(ns)

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

print(caesar(s, -n))

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

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

mods = 26
list2 = []
for i in s:
    a = (list1.index(i) +n)%mods
    list2.append(list1[a])

print("".join(list2))

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=list(input())
ans=[]
for i in S:
  ans.append(al[(al.index(i)+N)%26])
  
print("".join(ans))

Solution (Python):
import string
k = str(string.ascii_uppercase)
n = int(input())
s = input()
p = ''
for i in s:
	p += k[(k.index(i)+n)%26]
print(p)

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"]
ans=""
for i in range(len(s)):
    si=s[i]
    si_ind=alpha.index(si)
    si_ind+=n
    if(si_ind>=len(alpha)):
        si_ind-=len(alpha)
    ans+=alpha[si_ind]
print(ans)

Solution (Python):
base_int = ord('A')
N = int(input())
S = input()


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


print(''.join(s_base))

Solution (Python):
n = int(input())
s = input()
ls = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
sans = str()
for i in s:
    sans+= ls[ls.index(i) + n]

print(sans)

Solution (Python):
n = int(input())
word = input()
list1 = ['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 char in word:
    new+=list1[(list1.index(char)+n)%26]
print(new)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()
s = input()

for si in s:
  os = ord(si)
  print(chr(((os+n)-ord('A'))%26+ord('A')),end="")

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

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

N = int(input())
S = list(input().strip())
L = []

for i in range(len(S)):
    if ord(S[i])+N > 90:
        L.append(ord(S[i])+N-26)
    else:
        L.append(ord(S[i])+N)

for i in range(len(S)):
    print(chr(L[i]), end="")

Solution (Python):
from string import ascii_uppercase
maketrans = str.maketrans 

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

cipher_map = maketrans(ascii_uppercase, ascii_uppercase[N:] + ascii_uppercase[:N])
ans = S.translate(cipher_map)

print(ans)

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

ans = [chr(ord(x)+N) if ord(x)+N <= 90 else chr(ord(x)+N-90+64) for x in S]
print("".join(ans))

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
s=input()
ans=""

for i in range(len(s)):
    tmp=n
    if ord(s[i])+n>ord("Z"):
        tmp=ord(s[i])+n-ord("Z")
        ans+=chr(tmp+ord("A")-1)
        continue
    ans+=chr(ord(s[i])+tmp)
print(ans)

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

ans = []
for i in S:
    for j in range(len(x)):
        if i==x[j]:
            ans.append(x[(j+N)%26])
print("".join(ans))

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

Solution (Python):
N = int(input())
s = input()
s1 = ""
for i in s:
    t = ord(i) + N
    if t > 90:
        t -= 26
    s1 += chr(t)
print(s1)

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

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = N % 26
new_S = []
for i in S:
    for j in range(len(a)):
        if i == a[j]:
            new_S.append(a[j + N])
            break
print(''.join(new_S))

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

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

print("".join([S[(S.find(s) + N)%len(S)] for s in SEQ]))

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

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

print(ans)

Solution (Python):
n=int(input())
s=input()
p=[]
for i in range(len(s)):
	if ord(s[i])-ord("A")+n>=26:
		q=-26
	else:
		q=0
	p.append(ord(s[i])-ord("A")+q+n)
ans=""
for i in range(len(s)):
	ans+=chr(ord("A")+p[i])
print(ans)

Solution (Python):
def calc(N, s):
    abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    d = {abc[i]: i for i in range(len(abc))}
    t = [abc[(d[c] + N) % 26] for c in s]
    return ''.join(t)


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

Solution (Python):
n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alpha = alpha * 2
alpha = list(alpha)
s2 = ""
for i in s:
    s2 += alpha[alpha.index(i) + n]
print(s2)

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

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

Solution (Python):
N = int(input())
S = input()
from string import ascii_uppercase as a
ans = ''
for s in S:
    i = a.index(s)
    ans += a[(i+N)%26]
print(ans)

Solution (Python):
import string

txt = string.ascii_uppercase

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

print(''.join([txt[(txt.index(i) + N) % len(txt)] for i in S]))

Solution (Python):
n = int(input())
s = input()
l = len(s)
ans = ''
for i in range(l):
  
  ans += chr((ord(s[i])+n-65)%26+65)
print(ans)

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = []
for s in S:
    for i, a in enumerate(alphabet):
        if s == a:
            break
    ans.append(alphabet[(i + N) % 26])

print("".join(ans))

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    S = inputs[1]
    new_s = []
    ord_a = ord('A')
    ord_z = ord('Z')
    for c in S:
        ordc = ord(c)
        ordc += N
        if ordc > ord_z:
            d = ordc - ord_z - 1
            ordc = ord_a + d
        new_s.append(chr(ordc))
    return "".join(new_s)


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

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

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

def _rot13(c):
    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


def rot13(s):
    
    g = (_rot13(c) for c in s)
    
    return ''.join(g)



print(rot13(inputStr))

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']
for s in S:
    idx = A.index(s)+N
    if idx > 25:
        idx -= 26
    print(A[idx], end='')

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
ans = ''

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i in range(len(S)):
    j = 0
    while alphabet[j] != S[i]:
        j += 1
    ans += alphabet[(j + N) % 26]

print(ans)

Solution (Python):

import string

N = int(input().split()[0])
S = input()

s_list = list(string.ascii_uppercase + string.ascii_uppercase)
r = ""
for c in list(S):
    n = s_list.index(c)
    r += s_list[n + N]

ans = r
print(ans)

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

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2

ans = ''
for s in S:
    i = alpha.index(s)
    ans += alpha[i+n]
print(ans)

Solution (Python):
n=int(input())
l=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
s=input()
t=''
for i in range(len(s)):
  x=l.index(s[i])
  y=(x+n)%26
  t+=l[y]
print(t)

Solution (Python):


import sys
import math
import collections


n=int(input())



s=input()
ans=""

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

print(ans)

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

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

ans = ""
for i in range(len(s)):
    a = A.index(s[i])
    idx = (a + n) % 26
    ans += A[idx]

print(ans)

Solution (Python):
n=int(input())
s=input()
x=[]
abc='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
    idx=abc.find(s[i])
    x.append(abc[(idx+n)%26])
for i in range(len(s)):
    print(x[i],end='')
print()

Solution (Python):
N = int(input())
S = list(input())
a = []
cs = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
for c in S:
    a.append(cs[cs.index(c) + (N%26)])
print("".join(a))

Solution (Python):
import string
x = string.ascii_uppercase
t = int(input())
s = input()
ans = ""
for val in s:
    ans += x[(x.index(val)+t)%26]
print(ans)

Solution (Python):

from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re
import heapq


from copy import deepcopy
import itertools

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n = ii()
    s = list(input())

    alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')



    ans = ''
    for i in s:
        for a in range(26):
            if alpha[a] == i:
                ans+=alpha[a+n]


    print(ans)

main()

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

T = ""

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

print(T)

Solution (Python):
from string import ascii_uppercase

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

for c in s:
    x = (ascii_uppercase.index(c) + n) % len(ascii_uppercase)
    print(ascii_uppercase[x], end="")

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

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

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

Solution (Python):
n = int(input())
s = input()
L = []
for i in range(len(s)):
  L.append(s[i])
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']
for i in range(len(L)):
  cur = 0
  for j in range(26):
    if Alp[j] == L[i]:
      cur = j
  if cur+n < 26:
    L[i] = Alp[cur+n]
  else:
    L[i] = Alp[cur+n-26]
print(''.join(map(str, L)))

Solution (Python):
W = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = int(input())
S = input()
for s in S:
    print(W[(W.index(s)+N) % len(W)],end='')
print()

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

for i in s:
	i = ord(i)
	t = 0
	for j in range(ord('A'), ord('Z')+1):
		if i == j:
			t = j
	t+=N
	if t>ord('Z'):
		t -= 26
	print(chr(t),end='')
print()

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

a = [chr(i) for i in range(ord('A'),ord('Z')+1)]

res = ""
for x in S:
    for y in range(len(a)):
        if x == a[y]:
            index = y
            break
    res += a[(y+N)%26]
print(res)

Solution (Python):
n = int(input())
s = input()
alphabet = "abcdefghijklmnopqrstuvwxyz"
alphabet = alphabet.upper()

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

Solution (Python):

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

n = n%26
abc="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
dic={}
for i in range(26):
  dic[abc[i]]=abc[i+n]


tmp = [dic[si] for si in s]
ret="".join(tmp)

print(ret)

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

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

arr_init="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
arr="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

arr_new = arr[N:N+26]

print(''.join(list(map(lambda x:arr_new[arr_init.index(x)], S))))

Solution (Python):
N = int(input())
S = input()
d = {chr(i):i for i in range(65, 65+26)}
ans = ''
for s in S:
    ans = ans+chr((d[s]+N-65)%26+65)
print(ans)

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

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

ans = ''.join([chr(ord(s) + N if ord(s) + N <= ord('Z') else ord(s) + N - 26)  for s in S])

print(ans)

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

def rot(c, n):
    return chr(( ord(c)-ord('A') + n) % 26 + ord('A'))

for a in s:
    print(rot(a, n), end='')

Solution (Python):
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2
N = int(input())
S = input()
ans = ""
for s in S:
    ans += a[a.index(s) + N]
print(ans)

Solution (Python):
N = int(input())
S = list(input())
ans = ''
a = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
for s in S:
    ind = a.index(s) + N
    
    ans = ans + a[ind]
print(''.join(ans))

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

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

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

def enc(k, hirabun):
    hira = list(hirabun.encode("ascii"))
    ango = hira.copy()
    for i, code in enumerate(hira):
        if code in ALPHABET:
            if code + k > 90:
                ango[i] = code + k - 26
            else:
                ango[i] = code + k
    angobun = bytes(ango).decode("ascii")
    return(angobun)

print(enc(N, S))

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

Solution (Python):
import sys


def main():
    
    n = int(input())
    input_s = input()

    alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

    answer = ''

    for s in input_s:
        new_s = alphabet[alphabet.index(s)+n]
        answer += new_s

    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = input()
ans = ""
ord_a = ord("A")
f = [chr(ord_a + i) for i in range(26)]
for i in s:
  ans += f[(f.index(i) + n) % 26] 
print(ans)

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()
ans = []
for s in S:
    ans.append(chr((ord(s) - 65 + N) % 26 + 65))

print(''.join(ans))

Solution (Python):
def main():
    tar = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    N = int(input())
    S = input()
    ans = ""
    for s in S:
        ans = ans + tar[(tar.index(s) + N) % 26]
    print(ans)


if __name__ == '__main__':
    main()

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 = S.lower()
enc = ""

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

print(enc.upper())

Solution (Python):

import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

n=int(input())
s=list(input())
S = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
m=len(S)
for i in range(len(s)):
    tmp=S.index(s[i])
    tmp=(tmp+n)%m
    s[i]=S[tmp]
print(*s,sep="")

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"]
for i in range(len(s)):
    for j in range(len(l)):
        if s[i] == l[j]:
            print(l[(j+n)%26], end="")
            break
print()

Solution (Python):
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"]
n=int(input())
s=input()
t=""
for u in s:
  t+=a[(a.index(u)+n)%26]

print(t)

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

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

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

outputs = []
for char in s:
    before = ord(char) - ord('A')
    after = (before + n) % 26
    outputs.append(chr(after + ord('A')))

print(''.join(outputs))

Solution (Python):
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
moji = input()
ans = ''
for i in range(len(moji)):
    idx = alph.index(moji[i]) + n
    if idx >= len(alph):
        idx -= len(alph)
    ans += alph[idx]

print(ans)

Solution (Python):
N = int(input())
S = input()
lets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
outS = ''
for s in S:
  outS += lets[lets.find(s)+N]
print(outS)

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


def main():
    N = int(input())
    S = input().strip()
    import string
    a = string.ascii_uppercase
    a = a*2
    s = ""
    for c in S:
        s = s + a[a.index(c)+N]
    print(s)


if __name__ == '__main__':
    main()

Solution (Python):
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'


def main():
    dic = {c:i for i, c in enumerate(alpha)}
    n = int(input())
    s = input()
    print(''.join([alpha[(dic[c]+n)%26] for c in s]))


if __name__ == '__main__':
    main()

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


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

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

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
S = (stdin.readline().rstrip())
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*3

ans = ""
for i in S:
    ans += al[al.index(i)+N]
print(ans)

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

enc = ""

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

print(enc)

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

return_str = ""
for char in S:
  num = ord(char)+N
  if num > ord("Z"):
    num -= ord("Z")-ord("A")+1
  return_str += chr(num)
print(return_str)

Solution (Python):

def main():
    l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    n = int(input())
    S = input()
    print_line = []
    for s in S:
        print_line.append(l[(l.index(s)+n)%26])
    print(''.join(print_line))

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
s=input()
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b=''
for x in s:
  b+=a[(a.index(x)+n)%len(a)]
print(b)

Solution (Python):

def examB():
    N = I()
    S = SI()
    lim = ord("Z")
    ans = ""
    for s in S:
        cur = ord(s)+N
        if cur>lim:
            cur -=26
        ans += chr(cur)
    print(ans)
    return

def examC():
    return

def examD():
    return

def examE():
    return

def examF():
    return

import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

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

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

print(''.join(x for x in s))

Solution (Python):
n = int(input())
strings = input()
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

new_strings = ''
for s in strings:
    index = letters.index(s)
    added_index = index + n
    new_index = added_index % 26
    new_s = letters[new_index]
    new_strings += new_s

print(new_strings)

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

print(''.join(chr((ord(c) - ord('A') + N) % 26 + ord('A')) for c in S))

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

ab = ['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']

ret = ''
for ss in s:
    ret = ret + ab[(ab.index(ss) + n) % 26]
print(ret)

Solution (Python):
n = int(input())
s = input()
ALPH = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2
a = ""
for si in s:
  a += ALPH[ALPH.index(si) + n]
print(a)

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

for i in range(len(s)):
    c = s[i]
    co = ord(c)

    no = ord(c) + n
    if no > ord('Z'):
        no = no -  26
    s[i] = chr(no)
print("".join(s))

Solution (Python):
def main():
    k = int(input())
    s = input()
    A = []
    for c in s:
        val = ord(c) - ord('A')
        val = (val + k) % 26
        A.append(chr(val + ord('A')))
    print(''.join(A))

if __name__ == "__main__":
    main()

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    
    alphabet = list('abcdefghijklmnopqrstuvwxyz'.upper())
    
    n = int(input())
    s = input()[:-1]
    
    for i in s:
        
        print(alphabet[(alphabet.index(i)+n) % 26], end='')


if __name__ == '__main__':
    main()

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

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

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

print(''.join(ans))

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

N=int(input())
S=input()
ANS=""
for i in range(len(S)):
    for j in range(26):
        if S[i]==A[j]:
            ANS+=A[(j+N)%26]
print(ANS)

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

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

N = I()
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"]

for s in S:
    print(alp[(alp.index(s) + N) % 26], end="")

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
mlmis = lambda: [-int(x) for x in input().split()]
INF = float('inf')


def main():
    N = ii()
    S = input()
    for s in S:
        p = ord(s) - ord('A')
        p += N
        p %= 26
        print(chr(p+ord('A')), end='')

main()

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return "".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

s = list(input())

k = []

for i in range(len(s)):
    kkk = ord(s[i])
    ppp = kkk+n
    if ppp >= 91:
        ppp = ppp - 91
        ppp = 65 + ppp
    k.append(chr(ppp))
print(jo(k))

Solution (Python):
import math
N =  int(input())
S = list(input())
ans = []
for c in S:
    num = ord(c)
    num -= 65
    num += N
    num %=26
    num += 97
    ans.append(chr(num))
print("".join(ans).upper())

Solution (Python):
import string

dic = {i: c for i, c in enumerate(string.ascii_uppercase)}
dic_inv = {c: i for i, c in enumerate(string.ascii_uppercase)}
length = len(string.ascii_uppercase)

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

s_new = [dic[(dic_inv[c] + n) % length] for c in s]
print(''.join(s_new))

Solution (Python):
def p_b():
    t = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    n = int(input())
    s = input()
    for i in list(s):
        print(t[(t.index(i) + n) % len(t)], end="")
    print()
    
p_b()

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

alp = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

s_t = ''
for x in s:
  s_t += alp[(alp.index(x) + n) % 26]
  
print(s_t)

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

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

ans = ""
A = ord('A')
Z = ord('Z')
for s in S:
    t = ord(s)
    t = ((t-A+N) % (Z-A+1)) + A
    t = chr(t)
    ans += t
print(ans)

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



N = I()
S = str(input())
T = str()

for i in range(len(S)):
    x = ord(S[i])-ord('A')+N
    if x<=25:
        T += chr(ord('A')+x)
    else:
        T += chr(ord('A')+x-26)

print(T)

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"]
ans = []
for i in range(len(S)):
    idx = L.index(S[i])
    idx += N
    idx %= 26
    ans.append(L[idx])
    
print("".join(ans))