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):
t=int(input())
s=input()
c='A'
for i in range(len(s)):
  b=0
  if ord(s[i])+t>90:
    b-=26
  b+=ord(s[i])+t
  c+=str(chr(b))
print(c[1:])

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

temp = ''

for i in s:
    for j in range(n):
        if i != 'Z':
            i = chr(ord(i)+1)
        else:
            i = 'A'
    print(i, end='')

print()

Solution (Python):
import string
a = string.ascii_uppercase

x = int(input())
s = input()

for i in s:
  print(a[(a.index(i)+x)%26], end='')

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

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

return_string = ""
for alphabet in string:
	index = alpha2num(alphabet)

	new_num = index + num
	if new_num % 26 == 0:
		return_string += "Z"
	else:
		return_string += num2alpha(new_num % 26)

print(return_string)

Solution (Python):

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def main(s,n,a):
    s = list(s)
    for i in range(len(s)):
        num = a.find(s[i])
        j = (num+n)%26
        s[i] = a[j]
    s = ''.join(s)
    return s

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

print(main(s,n,a))

Solution (Python):
n = int(input())
s = list(input())
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

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

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

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

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

Solution (Python):
N = int(input())
SS = [i  for i in input()]

L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LL = [i for i in range(1, 26)]
ZZ = {}
YY = {}
for i, j in zip(L,LL) :
        ZZ[j] = i
        YY[i] = j
ZZ[0] = "Z"
YY["Z"] = 0

XX = [YY[i]+N for i in SS]
WW = [ZZ[i%26] for i in XX]
print("".join(WW))

Solution (Python):


alpha=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N=int(input())
S=input()
result=""
for i in S:
    index=alpha.index(i)
    result+=alpha[(index+N)%26]


print(result)

Solution (Python):
az = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2)

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

ans = ""
for s in S:
  val = ord(s) - ord('A')
  val = (val+N) % 26
  ans += chr(val+ord('A'))
  
print(ans)

Solution (Python):
az = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2)

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

ans = ""
for s in S:
  ind = az.index(s)+N
  ans += az[ind]
  
print(ans)

Solution (Python):
N = int(input())
S = input()
alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
result = ''
for char in S:
    index = alphabet.index(char)
    result += alphabet[(index + N) % 26]
print(result)

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

tt = ord('A')

n = inp()
s = input()
res = ''
for i in s:
    if ord(i) + n <= tt+25:
        tmp = chr(ord(i) + n)
    else:
        tmp = chr(ord(i) + n - 26)
    res += tmp
print(res)

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

ans=''
for i in range(len(S)):
  s = S[i]
  sind = ord('A') + (ord(s)-ord('A')+ n)%26
  ans += chr(sind)

print(ans)

Solution (Python):
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
S = input()

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

print(ans)

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

def caesar(s, n):
    ns = []
    for ch in s:
        
        if ('A' <= ch and ch <= 'Z'):
            ns.append(chr((ord(ch) - ord('A') - n) % 26 + ord('A')))
        
        elif ('a' <= ch and ch <= 'z'):
            ns.append(chr((ord(ch) - ord('a') - n) % 26 + ord('a')))
        
        elif ('0' <= ch and ch <= '9'):
            ns.append(chr((ord(ch) - ord('0') - n) % 10 + ord('0')))
        
        else:
            ns.append(ch)
    return "".join(ns)

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

Solution (Python):
az = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dic = {}
for i, s in enumerate(az):
  dic[s] = i
N = int(input())
S = input()

az2 = az+az
ans = ""
for s in S:
  ind = dic[s]+N
  ans += az2[ind]
  
print(ans)

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

S = list(S)

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

print("".join(S))

Solution (Python):
def rotater(n):
  def rotate(c):
    return chr((ord(c)-ord('A')+n)%26+ord('A'))
  return rotate
print(''.join(map(rotater(int(input())), input())))

Solution (Python):
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(input())
wli = list(input())
ali = []

for i in range(len(wli)):
    a = al.index(wli[i])
    ali.append(al[(n+a)%26])


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

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

ai = ord('A')

for i,s in enumerate(S):
    n = ord(s)
    nn= (n+N-ai)%26 + ai
    S[i]=chr(nn)

print(''.join(S))

Solution (Python):
N = int(input())
S = list(input())
A = [chr(i) for i in range(65, 65+26)]*2

for x in S:
  print(A[int(ord(x)+N-65)],end='')

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

for C in S:
    out = ord(C) + N
    if out > ord('Z'):
        out -= 26
    print(chr(out),end='')
print()

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

Solution (Python):
def resolve():
    ls='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    n=int(input())
    s=input()
    ans=''
    for t in s:
    	c=ls.index(t)
    	if n+c>25:
    	    n-=26
    	ans+=ls[n+c]
    print(ans)
resolve()

Solution (Python):
N=int(input())
a=[chr(ord('A')+i) for i in range(26)]
l={c:a[(a.index(c)+N)%26] for i,c in enumerate(a)}
ans=''
for c in input():
  ans+=l[c]
print(ans)

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

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

ans = ""
for i in range(len(s)):
    idx = 0
    for j in range(len(arr)):
        if (s[i] == arr[j][0]):
            idx = arr[j][1]

    ans += arr[((idx + n) % 26)][0]
print(ans)

Solution (Python):


n=int(raw_input())
s=raw_input()
t=''
for c in range(len(s)):
 x=ord(s[c])-ord('A')
 x=(x+n)%26
 t+=chr(ord('A')+x)
print t

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

s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

res = []

for i in S:
    index = s.index(i)
    s_index = index+N if index + N < 25 else index + N - 26
    res.append(s[s_index])

print(''.join(res))

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()
L = len(S)
S = list(S)
for i in range(L):
    for j in range(N):
        if S[i] != 'Z':
            S[i] = chr(ord(S[i])+1)
        else:
            S[i] = 'A'
print("".join(S))

Solution (Python):
ls=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N=26-int(input())
S=input()
ans=[]
for i in range(len(S)):
  x=ls.index(S[i])
  ans.append(ls[x-N])
print("".join(ans))

Solution (Python):
n = int(input())
s = list(input())
for i in range(len(s)):
    for j in range(65, 91):
        if s[i] == chr(j):
            if j + n >= 91:
                s[i] = chr(65 + n - (91 - j))
                break
            else:
                s[i] = chr(j + n)
                break
print(''.join(s))

Solution (Python):
class Cycle:
    def __init__(self, list, n):
        self.i = 0
        self.list = list
        self.n = n

    def next(self):
        self.i = (self.i + 1) % len(self.list)
        return self.list[self.i]

    def previous(self):
        self.i = (self.i - 1 + len(self.list)) % len(self.list)
        return self.list[self.i]

    def present(self):
        return self.list[self.i]

    def reset(self):
        self.i = 0
        return

    def get_ans(self, c):
        self.reset()
        while True:
            if c == self.list[self.i]:
                break
            else:
                self.next()
        cnt = self.n
        while cnt != 0:
            self.next()
            cnt -= 1
        return self.list[self.i]


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

cycle = Cycle(['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)

for c in S:
    print(cycle.get_ans(c), end="")

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

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
dic = {a:i for i,a in enumerate(alpha)}


ans = ''
for s in S:
    idx = dic[s]+N 
    if dic[s]+N > 25: idx -= 26
    ans += alpha[idx]
print(ans)

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

ans = ""
for s in S:
    if s.islower():
        alph = string.ascii_lowercase
    else:
        alph = string.ascii_uppercase
    ans += alph[(alph.find(s) + N) % 26]
print(ans)

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

alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans =""

for i in s:
    
    if alp.index(i)+1+n > 26:
        ans += alp[alp.index(i)+n-26]
    else:
        ans += alp[alp.index(i)+n]

print(ans)

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

N = int(raw_input())
S = map(str,raw_input())
for i in range(0,len(S)):
  for j in range(0,26): 
    if S[i] == list[j]:
      if j+N >= 26:
        S[i] = list[j+N-26]
        break
      else:
        S[i] = list[j+N]
        break
print(''.join(S))

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

Solution (Python):

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


def a_s_translator(s):
    n = ord(s)
    n += N
    if 65 <= n <= 90:
        t = chr(n)
    else:
        n -= 26
        t = chr(n)
    return t

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

print(*T, sep = "")

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

for s in S:
    tmp = ord(s)
    tmp += n
    if tmp > 90:
        tmp -= 26
    print(chr(tmp), end='')

Solution (Python):

N = int(input())
S = str(input())
for s in S:
    tmp = ord(s) + N
    if tmp > 90:
        tmp -= 26
    print(chr(tmp), end="")

Solution (Python):
def A():
    s = input()
    days = ['SAT', 'FRI', 'THU', 'WED', 'TUE','MON', 'SUN']
    print(days.index(s)+1)

def B():
    d = {chr(65+i): i for i in range(0, 26)}
    N = int(input())
    S = input()
    ans = ""
    def helper(n):
        if n>25:
            return n-26
        return n
    for c in S:
        ans+=chr(65+helper(N+d[c]))
    print(ans)
B()

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 = list(input().encode())
Acode = "A".encode()[0]
for i in range(len(s)):
  s[i] = (s[i] + n - Acode) % 26 + Acode 

print(bytearray(s).decode())

Solution (Python):
arphs = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
s = list(input())
i = []
for x in s:
  i.append(arphs[arphs.index(x) + n])
print("".join(i))

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

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


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

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):
N = int(input())
S = input()

result = ''
for s in S:
    result += chr(ord('A') + ((ord(s) - ord('A') + N)) % 26 )

print(result)

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

r = ''.join(chr((ord(c) - ord('A') + n) % 26 + ord('A')) for c in s)
print(r)

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

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

Solution (Python):
import string
n = int(input())
s = input()
for c in s:
  print(string.ascii_uppercase[(ord(c)-ord('A')+n)%26], end='')
print()

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

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

Solution (Python):
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(input())
s = input()
for i in s:
  k = l.index(i)+n
  print(l[k%26], end="")
print("")

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

ans =''
for a in S:
  ei = ord(a)-ord("A")
  ei = (ei + N )%26
  let = chr(ei + ord("A"))
  ans += let
print(ans)

Solution (Python):
alf = ([chr(i) for i in range(ord("A"), ord("Z") + 1)])
N = int(input())
s = str(input())
S = list(s)
ans = []
for i in S:
    num1 = alf.index(i)
    num2 = num1 + N
    if num2<= 25:
        ans.append(alf[num2])
    else:
        ans.append(alf[num2-26])
Ans = "".join(ans)
print(Ans)

Solution (Python):


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


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

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

Solution (Python):

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
s = input()
ans = ''
for x in s:
    ans += alphabet[(ord(x) - ord('A') + n) % 26]
print(ans)

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

    ans = ''
    for word in S:
        tmp = ord(word) 
        tmp += N
        if tmp > 90: tmp -= 26
        ans += chr(tmp) 

    print('{}'.format(ans))


if __name__ == '__main__':
    main()

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

ans = ''
for word in S:
    tmp = ord(word) 
    tmp += N
    if tmp > 90: tmp -= 26
    ans += chr(tmp) 

print('{}'.format(ans))

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

N = input()
S = input()

hoge1 = list(S)
hoge2 = [int(alpha2num(s)) + int(N) for s in hoge1]
hoge3 = [t - 26 if t > 26 else t for t in hoge2]
hoge4 = [num2alpha(t) for t in hoge3]

print(''.join(hoge4))

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

for  s in S:
    if ord(s) + N <= 90:
        O += chr((ord(s)+N))
    else:
        O += chr(64 + (ord(s) + N) - 90)

print(O)

Solution (Python):

import sys
from string import ascii_uppercase as alphabet


alpha_ind = dict((alphabet[i], i) for i in range(26))

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

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

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    def f(c, n):
        chars = [chr(i) for i in range(ord('A'), ord('Z')+1)]
        p = (chars.index(c) + n) % 26
        return chars[p]

    N = int(input())
    S = input()
    ans = ''
    for si in S:
        ans += f(si, N)
    print(ans)

    
  

if __name__ == "__main__":
    main()

Solution (Python):

import sys
from string import ascii_uppercase as alphabet

alpha_num = dict((alpha, num) for num, alpha in enumerate(alphabet, 0))

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

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

if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
S = input()
conv = []
rev = 0

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

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

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

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

a = []

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

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

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

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

Solution (Python):
n,s=open(0)
for c in s[:-1]:print(chr(65+(ord(c)-65+int(n))%26),end='')

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

Solution (Python):
from string import ascii_uppercase
n=int(input())
S=input()
d1,d2=dict(),dict()
for i,A in enumerate(ascii_uppercase):
    d1[i]=A
    d2[A]=i
ans=''
for s in S:
    ans+=d1[(d2[s]+n)%26]
print(ans)

Solution (Python):
n = int(input())
s = str(input())
ans = []
abc = [chr(i) for i in range(65,65+26)]
for i in range(len(s)):
    tmp = abc.index(s[i])
    
    if int((tmp+n)) >= int(len(abc)):
        ans.append(abc[(tmp+n) - len(abc)])
    else:
        ans.append(abc[tmp+n])

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

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

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

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

print(S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N])))

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

for i in range(len(S)):
  k = ord(S[i]) - ord('A')
  l = (k + N) % 26
  print(chr(l + ord('A')), end="")

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

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


def get_key(d, value):
    for k, v in d.items():
        if v == value:
            return k


output = []
a_dict = {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'}
for i, a in enumerate(a_list):
    n = get_key(a_dict, a)
    n += s
    if n > 26:
        if n % 26 == 0:
            n = 26
        else:
            n %= 26
    output.append(a_dict.get(n))
answer = ''.join(output)

print(answer)

Solution (Python):

n = int(input())
s = list(input())
num2alpha = lambda c: chr(c+65)
alpha2num = lambda c: num2alpha((ord(c) - ord('A')+ n)%26)

for i in range(len(s)):
    s[i] = alpha2num(s[i])
print(''.join(s))

Solution (Python):

n = int(input())
s = list(input())
num2alpha = lambda c: chr(c+65)
alpha2num = lambda c: num2alpha((ord(c) - ord('A')+ n)%26)

for i in range(len(s)):
    s[i] = alpha2num(s[i])
print(''.join(s))

Solution (Python):
N = int(input())
S = input()
ans = []
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','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
for i in range(0,len(S)):
    for j in range(0,26):
        if S[i] == alp[j]:
            ans.append(alp[j+N])
print("".join(ans))

Solution (Python):
n=int(input())
s=list(input())
t=""
for i in s:
    if ord(i)+n<=90:
        t+=chr(ord(i) + n)
    else:
        t+=chr(ord(i) + n -26)
print(t)

Solution (Python):
n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()

for i in range(len(s)):
  alp = s[i]
  for j in range(26):
    if alps[j] == alp:
      number = (j + n) % 26
      ans += alps[number]
      
print(ans)

Solution (Python):
n = int(input())
s = input()
for i in s:
    k = ord(i)+n
    print(chr(k-(k>ord("Z"))*26),end= "")

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

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

new = ""
for i in range( len( S ) ):
    _num = ord( S[i] ) + N
    if _num >=91:
        num = _num - 26
    else:
        num = _num
    alphabet = chr( num )
    new += alphabet 
print( new )

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

A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i,s in enumerate(S):
    n = A.index(s)
    if n+N > 25:
        nn = n+N-26
    else:
        nn = n+N
    S[i]=A[nn]

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

Solution (Python):
n=int(input())
z=input()
s=list(z)
n=n%26
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"]
x=int(len(s))
d=[]
for i in range(x):
    b=s.pop(0)
    y=a.index(b)
    if y+n>25:
        c=y+n-26
    else:
        c=y+n
    d.append(a[c])
v=int(0)
ans=''.join(d)   
print(ans)

Solution (Python):
int_N = int(input())
str_S = input()

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

ans = ""

for i in range(len(str_S)):
	cur = (str_list.index(str_S[i]) + int_N ) % 26
	ans += str_list[ cur ]

print(ans)

Solution (Python):
N=int(input())
S=input()
for c in S:
  k=ord(c)+N
  print(chr(k-(k>ord("Z"))*26),end="")

Solution (Python):
N=int(input())
S=input()
for c in S:
  k=ord(c)+N
  print(chr((k,k-26)[k>ord("Z")]),end="")

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

ans_ls = []
for x in str:
    i = ord(x) + num
    if i <= 90:
        ans_ls.append(i)
    else:
        ans_ls.append(i - 26)
ls = []
for y in ans_ls:
    l = chr(y)
    ls.append(l)

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

Solution (Python):
n = int(input())
alphabet_large = {chr(i):i for i in range(65, 65+26)} 
S = input()
ans = ""
for x in S:
    y = alphabet_large[x]+n
    if y >= 65+26:
        y -= 26
    ans += chr(y)

print(ans)

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



res = ['0' for i in range(len(S))]



for i in range(len(S)):
    res[i] = ord(S[i])+N
    if res[i] > ord('Z'):
        res[i] -= 26
    res[i] = chr(res[i])


result = ""
for i in range(len(S)):
    result += res[i]
print result

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

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

Solution (Python):
num = int(input())
target = 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"]
output = []        
for i in range(len(target)):
    tmp = alphabet.index(target[i])
    tmp = tmp + num
    while tmp >= 26:
        tmp = tmp - 26        
    output.append(alphabet[tmp])
print("".join(output))

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

le=len(s)
ans=""
for i in range(0,le):
    u=0;
    for j in range(0,26):
        if(t[j]==s[i]):
            u=j
    ans+=t[(u+n)%26]
print(ans)

Solution (Python):
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']
n = int(input())
s = input()
s_list = list(s)
rot=[]
for i in range(len(s_list)):
    for j in range(26):
        if alpha[j] == s_list[i]:
            pos = (j+n) % 26
            rot.append(alpha[pos])
print(''.join(rot))

Solution (Python):
import sys



def rot_n(c, n):
	ci=ord(c)-ord('A')
	nci = (ci + n )%26
	nci+=ord('A')
	ret = chr(nci)
	return ret

def main():
	n = int(input())
	s = input()
	
	c=['A']*len(s)
	for i in range(len(s)):
		c[i]=rot_n(s[i], n)
	
	print(''.join(c))
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
x=int(input())
s=input().strip()
ans=""
for i in s:
	xx=(ord(i)-ord('A'))+x 
	xx=xx%26
	cc=chr(ord('A')+xx)
	ans+=cc
print(ans)

Solution (Python):
N = int(input())
S = input()
i2s = {i:s for i, s in zip(range(26), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}
s2i = {s:i for i, s in zip(range(26), "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}
ans = ""
for s in S:
    ans = ans + i2s[(s2i[s]+N)%26]
print(ans)

Solution (Python):
n = int(input())
s = input()
ans = [''] * len(s)

for i in range(len(s)):
  rot = ord(s[i]) + n
  if rot > ord('Z'):
    rot -= (ord('Z') - ord('A') + 1)
    
  ans[i] = chr(rot)
  
print(''.join(ans))

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

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

Solution (Python):
n=int(input())
s=input()
leng=len(s)
slist=[]

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

for i in range(0,leng):
    for j in range(0,26):


        if s[i]==alphabet[j]:
            
            slist.append(alphabet[j+n])
            
            

print(''.join(slist))

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

s = input()

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 3)

ans = ''
for ss in s:
  index = alpha.index(ss)
  ans += alpha[index + N]
  
print(ans)

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

ans = ""

for i in s :
    if ord('A') <= ord(i) <= ord('Z') :
        ans = ans + chr(abs(((ord(i) + n - ord('A')) % 26)) + ord('A'))

print (ans)

Solution (Python):
n = int(input())
s = input()
ns = []
for ch in s:
    if ('A' <= ch and ch <= 'Z'):
        ns.append(chr((ord(ch) - ord('A') + n) % 26 + ord('A')))
       
   
print("".join(ns))

Solution (Python):
def main():
  
    ss = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ss_rev = dict()
    for i in range(len(ss)):
      ss_rev[ss[i]] = i
 
    N = input()
    N = int(N)
    S = input()
    ans = ""
    for i in range(len(S)):
      ans += ss[(ss_rev[S[i]]+N)%26]
    print(ans)
    
 
if __name__ == '__main__':
  main()

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


def encrypt(S, N):
    X = ""

    for ch in list(S):
        if 'A' <= ch <= 'Z':
            X += chr((ord(ch) - ord('A') + int(N)) % 26 + ord('A'))
        elif 'a' <= ch <= 'z':
            X += chr((ord(ch) - ord('a') + int(N)) % 26 + ord('a'))
        else:
            X += ch

    return X


X = encrypt(S, N)
print(X)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

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

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

Solution (Python):
def f(N,S):
    alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ret_s = ""
    for s in S:
        num = (alpha.index(str(s)) + int(N))
        if num <= 25:
            pass
        else:
            num = num-(num//26)*26
        ret_s += alpha[num]
    return print(ret_s)
  
a = input()
b = input()
 
f(a,b)

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

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

for item in S:
    if item + N > 90:
        s.append(chr(item + N - 26))
    else:
        s.append(chr(item + N))

out = "".join(s)

print(out)

Solution (Python):
N = int(input())
S = input()
AA = []
for i in range(len(S)):
    AA.append(S[i])

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

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

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


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

BB = "".join(AA)
print(BB)

Solution (Python):

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

def translate(s, n):
    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']

    for i in range(0, 26):
        if alphabet[i] == s:
            return alphabet[(i + n) % 26]



for c in s:
    print(translate(c, n), end="")

Solution (Python):
N=int(input())
S=input()
ans = ""
for ch in S:
    if ("a" <= ch and ch <= "z"):
        ans += chr((ord(ch) - ord('a') + N) % 26 + ord('a'))
    elif ("A" <= ch and ch <= "Z"):
        ans += chr((ord(ch) - ord('A') + N) % 26 + ord('A'))
    elif ('0' <= ch and ch <= '9'):
        ans += chr((ord(ch) - ord('0') - N) % 10 + ord('0'))

print(ans)

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