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()
worddic={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"}
word=["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"]
nowindex=0
ans=""

for i in range(len(s)):
  nowindex=word.index(s[i])
  if nowindex+n<=25:
    ans+=worddic[nowindex+n]
  else:
    ans+=worddic[nowindex+n-26]
print(ans)

Solution (Python):
alp = [chr(ord("A")+i) for i in range(26)]
n = int(input())
s = input()

for i in range(len(s)):
    x = alp.index(s[i])
    if x + n >= 26:
        print(alp[x+n-26],end="")
    else:
        print(alp[x+n],end="")

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

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

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

print(''.join(str))

Solution (Python):
ALPH='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

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

for i in range(len(S)):
    for j in range(26):
        if S[i]==ALPH[j]:
            list_ans.append(ALPH[j+N])
print(''.join(list_ans))

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

for e in S:
    ascii = ord(e) + N
    if ascii > 90:
        ascii = ascii - 90 + 64
    new = chr(ascii)
    new_S.append(new)

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

Solution (Python):
N = int(input())
S = input()
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
A = ''
for i in S:
  X = L.index(i) + N
  while X >= 26:
    X -= 26
  A += L[X]
print(A)

Solution (Python):
List="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n=int(input())
s=input()
ans=""
for i in range(len(s)):
  num=List.index(s[i])+n
  
  if (num>25):
    num=num-26
  ans=ans+List[num]
print(ans)

Solution (Python):

N = int(input())
S = list(input())
alp = [chr(i)for i in range(65,91)]
L=[]
for i in range(len(S)):
    for m in range(len(alp)):
        if S[i]==alp[m]:
            if m + N <=25:
                L.append(alp[m+N])
            else:
                L.append(alp[m+N-26])
print(''.join(L))

Solution (Python):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = s()
l = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in range(len(s)):
    print(l[l.index(s[i])+n],end="")

Solution (Python):
n = int(input())
s = list(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","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)):
    s[i] = a[a.index(s[i]) + n]
print(*s, sep="")

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

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

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



AA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
    x = AA.find(S[i])
    y = (x + N) % 26
    ans += AA[y]
print(ans)

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in range(len(S)):
  idx = alphabet.find(S[i])
  idy = (idx + N) % 26
  ans += alphabet[idy]
  
print(ans)

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

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

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

Solution (Python):

N = int(input())
S = list(input())
out = ''
for i in S:
    if ord(i) + N > 90:
        out += chr(ord(i) + N - 26)
    else:
        out += chr(ord(i) + N)
print(out)

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

Solution (Python):
n = int(input())
s = input()
replace_list = []
a_ascii = ord("A")
for i in s:
    i_ascii = ord(i) + n
    x = i_ascii - a_ascii
    if x > 25:
        y = x - 26
        replace_i = chr(a_ascii + y)
        replace_list.append(replace_i)
    else:
        replace_i = chr(i_ascii)
        replace_list.append(replace_i)
print("".join(replace_list))

Solution (Python):
n = int(input())
s = list(input())
alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
s_position = []
ans = []
for i in range(len(s)):
    s_position.append(alphabet.index(s[i]))


for j in range(len(s)):
    if (s_position[j] + n) >= 26:
        ans.append(alphabet[s_position[j] + n - 26])
    else:
        ans.append(alphabet[s_position[j] + n])
print(''.join(ans))

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

Solution (Python):
def get_key_from_value(d, val):
    keys = [k for k, v in d.items() if v == val]
    if keys:
        return keys[0]
    return None


dic = {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"}
n = int(input())
s = input()
for i in s:
    print(dic[(get_key_from_value(dic, i) + n) % 26], end = "")

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()
s=list(ss())
for i in range(len(s)):
    p=ord(s[i])
    if p+n >=91:

        s[i]=chr(p+n-26)

    else:

        s[i]=chr(p+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)
    elif ord(i)+n >90:
        ans +=chr(ord(i)+n-26)
print(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 = list(input())
B = []
for i in range(len(S)):
  for j in range(26):
    if S[i] == A[j]:
      if j+N > 25:
        B.append(A[j+N-26])
      else:
        B.append(A[j+N])
print(''.join(B))

Solution (Python):

import sys
import string


def solve(N: int, S: str):
    l = list(string.ascii_uppercase)
    ans = ''
    for s in S:
        ans += l[(l.index(s) + N) % 26]
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):
a = [chr(i) for i in range(65,65+26)]
n = int(input())
s = input()
ans = ""
for i in range(len(s)):
    x = (a.index(s[i])+n)%26
    ans += a[x]
print(ans)

Solution (Python):
import string
al = list(string.ascii_uppercase)
n = int(input())
s = input()
ans = ""
for ch in s:
  i = al.index(ch)
  if len(al) > (i+n): ans += al[i+n]
  else: ans += al[(i+n)-len(al)]
print(ans)

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

T=[]
z=ord("Z")
for i in range(len(S)):
    s=ord(S[i])
    s+=N
    if s>z:
        s-=26
    T.append(chr(s))

print("".join(T))

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

for i in range(0, len(s)):
  x = ord(s[i]) - ord('A')
  x = (x + n) % 26
  a.append(chr(x + ord('A')))
print(''.join(a))

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

al = list(string.ascii_uppercase)
ans = []
for i in S:
    pos = al.index(i) + N
    if pos < 26:
        ans.append(al[pos])
    else:
        ans.append(al[pos-26])
print(''.join(ans))

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

ABCtoNum = dict()
NumtoABC = dict()
for i, s in enumerate('ABCDEFGHIJKLMNOPQRSTUVWXYZ'):
    ABCtoNum[s] = i
    NumtoABC[i] = s
ABC_N = dict()
for s, i in ABCtoNum.items():
    ABC_N[s] = NumtoABC[(i+N)%26]

ans = list()
for s in S:
    ans.append(ABC_N[s])
print(''.join(ans))

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

STRINGS = [chr(ord('A') + i) for i in range(26)]
res = ""
for s in S:
    idx =( STRINGS.index(s) + N) % 26
    res += STRINGS[idx]

print(res)

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

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

print(char)

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

words = [chr(i) for i in range(65, 65+26)]
words2 = [chr(i) for i in range(65, 65+26)] * 2
for i in range(len(S)):
    ind = words.index(S[i]) + N
    print(words2[ind],end="")

Solution (Python):

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

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

Solution (Python):
def f(c):
    ret = ord(c)+n
    if ret > ord('Z'):
        ret -= ord('Z') - ord('A') + 1
    return chr(ret)

n = int(input())
s = input()
print(''.join(map(f, s)))

Solution (Python):
def main():
    N = int(input())
    S = input()
    res = ''
    for c in S:
        v = ord(c) + N
        if v > 90:
            v = v % 90 + 64
        res += chr(v)
    print(res)
    

main()

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

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

Solution (Python):
N = int(input())
S = input()
for i in S:
  x = N + ord(i)
  if x > 90:
    x -= 26
  y = chr(x)
  print(y,end='')

Solution (Python):
n = int(input())
s = list(input())
for i in s:
  a = n+ord(i)
  if a>90:
    a -= 26
  b = chr(a)
  print(b,end='')

Solution (Python):
n=int(input())
S=input()
o=ord('A')
for s in S:
    s=(ord(s)-o+n)%26
    print(chr(s+o),end="")

Solution (Python):
n = int(input())
s = list(input())
ans = ''
for i in s:
  o = ord(i) + n
  if i.islower():
    r = (o-97) % 26
    ans = ans + chr(97+r)
  elif i.isupper():
    r = (o-65) % 26
    ans = ans + chr(65+r)
print(ans)

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

lst = []
for i in S:
    x = ord(i)
    if x + N > 90:
        x = x - 90 - 1 + 65
    lst.append(chr(int(x) + N))
print(''.join(lst))

Solution (Python):
c = int(input())
S = input()
l = ""
for i in range(len(S)):
    m = ord(S[i])+c
    if m > 90:
        m -= 26
    l += chr(m)
print(l)

Solution (Python):
a = [chr(i) for i in range(65, 65+26)]
n = int(input())
s = input()
s_new = []

for i in range(len(s)):
    t = ord(s[i])
    t1 = t + n
    if t1 > 90:
        t1 = t1 - 26
    s_new.append(chr(t1))
print(*s_new,sep='')

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

Solution (Python):
n = int(input())
s = input()
strings = [chr(ord(c)+n) if ord(c)+n <= ord("Z") else chr(ord(c)+n-26) for c in s]
ans = "".join(strings)
print(ans)

Solution (Python):
n = input()
s = raw_input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
r = ""
for i in s:
    r += l[l.index(i)+n]
print r

Solution (Python):













n = int(input())
s = input()
ans = []
for i in s:
    ans.append(chr((ord(i)-ord('A')+n)%26 + ord('A')))

print(''.join(ans))

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

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

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

sa=""
for i in s:    
    if ord(i)+n > ord("Z"):
        sa+=chr(ord("A")-1+ord(i)+n - ord("Z"))
    else:
        sa+=chr(ord(i)+n)

print(sa)

Solution (Python):
N = int(input())
S = input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H =""
for i in S:
    a = (l.index(i) + N) % 26
    H += l[a]
print(H)

Solution (Python):
alplist = ["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(len(alplist)):
    if s[i] == alplist[j]:
      if j + n <= len(alplist)-1:
        ans += alplist[j+n]
      else:
        ans += alplist[j+n-len(alplist)]
print(ans)

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

Solution (Python):
n = int(input())
s = input()
z = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

l = []
for x in s:
  if x in z:
    l.append(z[(z.index(x))+n])

print(''.join(l))

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

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

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

def convert(s):
    if N + ord(s) <= ord('Z'):
        return chr(N + ord(s))
    else:
        return chr(ord('A') + ((N + ord(s)) - ord('Z') - 1))

print(''.join(list(map(convert, list(S)))))

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.buffer.readline())
    S = sys.stdin.buffer.readline().decode().rstrip()


    ret = []
    for s in S:
        n = (ord(s) + N - 65 ) % 26
        ret.append(chr(n+65))

    print("".join(ret), end="")


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.buffer.readline())
    S = sys.stdin.buffer.readline().decode().rstrip()

    ret = []
    for s in S:
        n = ord(s) + N
        if n > 90:
            ret.append(chr(n - 26))
        else:
            ret.append(chr(n))

    print("".join(ret), end="")


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = input()
ret = []
for s in S:
    n = ord(s) + N
    if n > 90:
        ret.append(chr(n - 26))
    else:
        ret.append(chr(n))

print("".join(ret), end="")

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

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

Solution (Python):
N=int(input())
S=input()
ans=""
for i in range(len(S)):
    index=ord(S[i])+N
    if index>=91:
        index=index-26
    ans=ans+chr(index)
print(ans)

Solution (Python):
N = int(input())
S = str(input())
ans =""
for c in S:
    tmp=ord(c)+N
    if(tmp>90):
        tmp=tmp-90+64
    ans+=chr(tmp)
print(ans)

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

Solution (Python):

N = int(input())

S = input()

S_list = list(S)

ans = ""
for i in range(len(S_list)):
  if(ord(S_list[i])+N<=90):
    
    ans = ans + chr(ord(S_list[i]) + N)
  else:
    a = ord(S_list[i])+N - 90
    
    ans = ans + chr(a+64)
  
print(ans)

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

Solution (Python):
n = int(input())
s = input()
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''


for i in range(len(s)):
    k = alp.index(s[i])
    
    ans += alp[k + n - 26]

print(ans)

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

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

print(ans)

Solution (Python):
import string

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

l = string.ascii_uppercase
ans = [l[(l.index(s) + N) % len(l)] for s in S]

print("".join(ans))

Solution (Python):
N = int(input())
S=list(input())
A=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
for i in range(len(S)):
    S[i] = A[(A.index(S[i])+N)%26]
print(*S, sep="")

Solution (Python):
n=int(input())
s=input()
a=''
for c in s:
    t=ord(c)+n
    if t>90:
        t=t-90+64
    a+=chr(t)
print(a)

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

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

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for c in s:
    ans += a[(a.find(c) + n) % 26]
print(ans)

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

ss = [0]*len(s)

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

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

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

print(ans)

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

for i in range(len(s)):
    d=ord(s[i])
    d+=n
    if d>ord('Z'):
        d=d-ord('Z')+ord('A')-1
    s[i]=chr(d)

print("".join(s))

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
p = ''
for i in range(len(s)):
  x = a.find(s[i])
  x += n
  if x <= 25:
    p += a[x]
  else:
    p += a[x-26]
print(p)

Solution (Python):
shift = int(input())
X = input()
ans=''


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']
DIC = {'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}



for i in X:
    ans += LIST[(DIC[i] + shift) % 26]
    
print (ans)

Solution (Python):
n=int(input())
s=list(input())
change="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA"
change2=""
for i in range(26):
  change2+=change[i+n] 
for i in range(len(s)):
	s[i]=change2[change.find(s[i])]
print("".join(s))

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

for ss in s:
    i = ord(ss)
    i += n
    if i > 90:
        i -= 26
    ss = chr(i)
    print(ss,end="")

Solution (Python):

def main():
    num = int(input())
    str = input()

    array = []

    for i in range(len(str)):
        change_str = ord(str[i])
        over_num = change_str +  num
        if (over_num > 90):
            over_num = over_num - 90 + 64
        
        array.append(chr(over_num))
    
    str2 = ''.join(array)
    print(str2)

if __name__ == "__main__":
    main()

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

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

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

for i in range(len(S)):
    for j in range(0, 26):
        if j+N<=25:
            if S[i]==chr(j+65):
                S[i]=chr(j+65+N)
                break
        else:
            if S[i]==chr(j+65):
                S[i]=chr(j+65+N-26)
                break

print(''.join(S))

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

ans = ""

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

print(ans)

Solution (Python):
N = int(input())
S = input()
A = []
for i in range(len(S)):
    asc = ord(S[i])
    if(asc + N > 90):
        asc = asc+N-26
    else:
        asc += N
    A.append(chr(asc))

print("".join(A))

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

Solution (Python):
def solve():
    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)

    return ans

print(solve())

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

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

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

print(T)

Solution (Python):
def main():
    n = int(input())
    ss = list(input())

    ans = ''
    for s in ss:
        ans_temp = ord(s) + n
        if ord('A') <= ans_temp <= ord('Z'):
            ans += chr(ans_temp)
        if ans_temp < ord("A"):
            ans += chr(ord('Z') - (ord("A") - ans_temp) - 1)
        if ans_temp > ord('Z'):
            ans += chr(ord("A") + (ans_temp - ord('Z')) - 1)

    print(ans)


if __name__ == "__main__":
    main()

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

for ss in s:
    i = ord(ss)
    i += n
    if i > 90:
        i -= 26
    ss = chr(i)
    print(ss,end="")

Solution (Python):

"""
Created on Wed Mar 11 14:41:22 2020

@author: Kanaru Sato
"""

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

loop = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2)

for i in range(len(s)):
    s[i] = loop[loop.index(s[i])+N]

print("".join(s))

Solution (Python):

"""
Created on Tue Mar 10 21:49:13 2020

@author: Kanaru Sato
"""

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

dict = {'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': 0}
slist = []
[slist.append(s[i]) for i in range(0,len(s))]

for i in range(0, len(s)):
    n = dict[slist[i]]
    n = (n+N)%26
    slist[i] = [k for k in dict.keys() if dict[k]==n][0]

ans = ""
for i in range(0,len(slist)):
    ans = ans+slist[i]
print(ans)

Solution (Python):
N=int(input())
S=list(input())
cha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2)
for i in range(len(S)):
    S[i]=cha[cha.index(S[i])+N]
print("".join(S))

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

def rot(s,n):
  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"]
  S = []
  for i in range (len(s)):
    S.append(s[i])
  for i in range (len(S)):
    for j in range (len(ALP)):
      if S[i] == ALP[j]:
        S[i] = ALP[(j+n)%26]
        break
  res = S[0]
  for i in range(1, len(S)):
    res+=S[i]
  return res
            
print(rot(S,N))

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

Solution (Python):
import math

N = int(input())
S = input()
alphabets = ['A']
for i in range(25):
  alphabets.append(chr(ord(alphabets[-1]) + 1))
ans = ''
for s in S:
  ans += alphabets[(alphabets.index(s)+N)%26]

print(ans)

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

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

ans = ''


for i in range(len(s)):
    xxx = s[i]
    index = mozi_list.index(xxx)
    new_index = index + n
    if new_index >= 26:
        new_index -= 26
    
    ans += mozi_list[new_index]

print(ans)

Solution (Python):
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

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

def searchIndex(c):
    return alphabet.index(c)
  
s_rot_n = ''
for i in range(len(s)):
    index = (searchIndex(s[i]) + n) % 26
    s_rot_n += alphabet[index]
    
print(s_rot_n)

Solution (Python):
import string

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

a = list(string.ascii_uppercase)
a += a

ans = ''
for c in s:
    ans += a[a.index(c) + n]

print(ans)

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

print(a)

Solution (Python):
N = int(input())
S = input()
B = []
for i in range(len(S)):
    if ord(S[i])+N<=ord('A')+25:
        B.append(chr(ord(S[i])+N))
    else:
        B.append(chr(ord(S[i])+N-26))
print(''.join(B))

Solution (Python):
N = int(input())
S = str(input())
s = len(S)
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(s):
  for j in range(26):
    if S[i] == alp[j]:
      S += alp[j+N]
print(S[s:len(S)])

Solution (Python):
mojiretu = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
output = ""
index = 0
N = int(input())
S = input()

for j in S:
  count = 0
  for i in mojiretu:
    if i == j:
      output = output + (mojiretu[count + N]) 
      break
    count = count + 1  
  index = index + 1

print(output)

Solution (Python):
t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
n=int(input())
ans=""
for i in input():
  ans+=t[t.index(i)+n]
print(ans)

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

Solution (Python):
n=int(input())
s=input()
ans="e"
for i in s:
    if ord(i)+n>90:
        ans+=chr(ord(i)+n-26)
        continue
    ans+=chr(ord(i)+n)
print(ans[1:])

Solution (Python):
import string
letters = list(string.ascii_uppercase * 2)
N = int(input())
S = list(input())
ans = ""
for i in range(len(S)):
    ans += letters[letters.index(S[i]) + N]
print(ans)

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

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

result = ''.join(S_new)
print(result)

Solution (Python):
N = int(input())
S = list(input())
c2i = lambda c: ord(c) - ord('A')
i2c = ['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, s in enumerate(S):
    index = c2i(s)
    index += N
    if index >= 26:
        index -= 26
    S[i] = i2c[index]

print(''.join(S))

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

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

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

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

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

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

alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = [alp[(alp.index(s) + N) % 26] for s in S]
print(''.join(ans))

Solution (Python):
N = int(input())
S = input()
res = ""
for s in S:
    res += chr((ord(s) - ord("A") + N) % 26 + ord("A"))
print(res)

Solution (Python):
N = int(input())
S = input()
res = ""
for s in S:
    res += chr((ord(s) - ord("A") + N) % 26 + ord("A"))
print(res)

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

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

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

if __name__ == "__main__":
    main()

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

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


def rot_encode(n):
    from string import ascii_lowercase as lc, ascii_uppercase as uc
    lookup = str.maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n])
    return lambda s: s.translate(lookup)


print(rot_encode(N)(S))

Solution (Python):
N=int(input())
S=list(input())
hako=str()
for i in S:
  ad=ord(i)
  newad=ad+N
  if newad>ord('Z'):
    newad=newad-ord('Z')+ord('A')-1
  hako+=chr(newad)
print (hako)

Solution (Python):
n = int(input())
res = []
s = input()
res = list(map(lambda a:chr(((ord(a) - ord('A') + n) % 26) + ord('A')),list(s)))
print("".join(res))

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())
ans = ""
for c in input():
  ans+= chr((ord(c)-ord('A')+n)%26+ord('A'))
print(ans)

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

    ans = ""
    for c in S:
        asc_c = ord(c) + N
        asc_A = ord("A")
        asc_Z = ord("Z")

        if asc_c > asc_Z:
            asc_c = asc_A + (asc_c % asc_Z) - 1
        
        ans += chr(asc_c)
    print(ans)


if __name__ == "__main__":
    main()

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







ss = str()

for i in s:
    t = chr(ord(i) + n)

    if ord(t) > ord('Z'):
        t = chr(ord(t) - ord('Z') + ord('A')-1)
    
    ss += t

print(ss)

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

ss=str()

for i in s:
    t = chr(ord(i) + n)
    
    if ord(t) > ord('Z'):
        t = chr(ord(t) - ord('Z') + ord('A')-1)
    
    ss += t

print(ss)

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

ss=str()

for i in s:
    t = chr(ord(i) + n)
    
    if ord(t) > ord('Z'):
        t = chr(ord(t) - ord('Z') + ord('A')-1)
    
    ss += t

print(ss)