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()
S_list=list(S)
ans=""
str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S_list)):
    for j in range(len(str)):
        if S_list[i]==str[j]:
            ans+=str[(j+N)%26]
            break

print(ans)

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

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

Solution (Python):
def q2(in_num, in_str):
    o_str = ""
    letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    for i in range(len(in_str)):
        o_str += (letters[(letters.index(in_str[i])+int(in_num))%26])
    return o_str

print(q2(input(),input()))

Solution (Python):
ans=""
alphabet=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N=int(input())
s=input()
toInt={}
for i in range (len(alphabet)):
    toInt[alphabet[i]]=i
for i in range (len(s)):
    c=(toInt[s[i]]+N)%26
    ans+=(alphabet[c])
print(ans)

Solution (Python):
import string
List = [chr(i) for i in range(65,65+26)]
N = int(input())
s = list(input())
ans = ''
for i in range(len(s)):
  Next_index = List.index(s[i])+N
  if Next_index>25:
    Next_index = abs(26-Next_index)
  ans += List[Next_index]
print(ans)

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

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

Solution (Python):
shift = int(input())
string = input()
out = ""

letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for s in string:
    out += letters[(letters.index(s) + shift) % 26]

print(out)

Solution (Python):
from sys import stdin

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

ans = ''

for s in S:
    asc = ord(s) + N
    if asc > ord('Z'):
        asc -= 26
    ans += chr(asc)
print(ans)

Solution (Python):
N=int(input())
S=input()
a=[]
b=[]
for i in range(26):
  a.append(chr(i+65))

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

Solution (Python):
import string

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

lis = list(string.ascii_uppercase)
answer = []

for s in S:
    index = lis.index(s)
    slide_index = index + N
    if slide_index > 25:
        slide_index -= 26
    new_s = lis[slide_index]
    answer.append(new_s)

answer = ''.join(answer)

print(answer)

Solution (Python):
N = int(input())
S = input()
alphabet = 'ZABCDEFGHIJKLMNOPQRSTUVWXY'
alphabet_num = {st: num for num, st in enumerate(alphabet)}
alphabet_list = [st for st in alphabet]

for s in S:
  num = (alphabet_num[s] + N) % 26
  print(alphabet_list[num], end='')

Solution (Python):
N = int(input())
S = input()
alphabet = 'ZABCDEFGHIJKLMNOPQRSTUVWXY'
alphabet_num = {st: num for num, st in enumerate(alphabet)}
alphabet_list = [st for st in alphabet]

for s in S:
  num = (alphabet_num[s] + N) % 26
  print(alphabet_list[num], end='')

Solution (Python):
N = int(input())
S = input()
alphabet = 'ZABCDEFGHIJKLMNOPQRSTUVWXY'
alphabet_num = {st: num for num, st in enumerate(alphabet)}
alphabet_list = [st for st in alphabet]

output = ''
for s in S:
  num = (alphabet_num[s] + N) % 26
  output += alphabet_list[num]
print(output)

Solution (Python):
upper = [chr(i) for i in range(65, 65+26)]

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

ans = []
for s in S:
    idx = upper.index(s)
    ans.append(upper[(idx+N)%26])
print(''.join(ans))

Solution (Python):
ref = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
res = ''
for c in S:
  res+=ref[ref.find(c) + N]
 
print(res)

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

Solution (Python):
char=['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 range(len(s)):
    ans+=char[(char.index(s[i])+n)%26]
print(ans)

Solution (Python):
li = ['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()
re = ''
for c in s:
    re += li[(li.index(c) + n) % 26]
print(re)

Solution (Python):
N = int(input())
S = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
  for j in range(26):
    if li[j] == sli[i]:
      sli[i] = li[j+N]
      break
print("".join(sli))

Solution (Python):
ref = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
res = ''
for c in S:
  res += ref[ref.find(c) + N]

print(res)

Solution (Python):
N = int(input())
S = input()
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s = [i for i in S]

for i in range(len(S)):
  index = alp.index(S[i])
  ans_index = (index + N + 1) % 26
  s[i] = alp[ans_index - 1]

ans = ""
for i in s:
  ans += i
print(ans)

Solution (Python):
n = int(input())
s = input()
ans = ""
for i in range(len(s)):
    index = ord(s[i]) + n
    if index > ord("Z"):
        index = (index - ord("Z") - 1) + (ord("A"))
    
    ans += chr(index)
print(ans)

Solution (Python):


def main():
    num = int(input())
    string = input()
    string_list = ['' for i in range(len(string))]
    for i in range(len(string)):
        string_list[i] = (ord(string[i]) - 65 + num) % 26
        string_list[i] = chr(string_list[i] + 65)

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





if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = input()
kai = []
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']
for n in range(len(S)):
    for num,c in enumerate(alpha):
        if S[n] == c:
            if num + N > 25:
                num = num + N - 26
                kai.append(alpha[num])
                break
            kai.append(alpha[num + N])
            break

print("".join(kai))

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

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

for i in range(len(s)):
  a = alp.index(s[i])
  b = a+n
  if b > 25:
    b = b - 26
  out += alp[b]

print(out)

Solution (Python):
N = int(input())
S = input()
ltrs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for ltr in S:
    idx = (ltrs.index(ltr) + N) % 26
    ans += ltrs[idx]
print(ans)

Solution (Python):
if __name__=='__main__':
    n=int(input())
    s=input()
    result=""
    for i in range(len(s)):
        result=result+chr(abs(ord(s[i])+n-ord('A'))%26+ord('A'))
    print(result)

Solution (Python):
N=int(input())
S=input()
result = ""
for s in S:
    if ord(s) + N <= 90:
        result += chr(ord(s) + N)
    else:
        result += chr(ord(s) + N - 26)
print(result)

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

alphabet = [chr(ord("A") + i) for i in range(26)]


for i in n:
    a = (alphabet.index(i) + s) % 26
    r.append(alphabet[a])

print("".join(r))

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

for s in S :
    m = ord(s)+n
    if m > ord("Z") :
        m -= 26
    r+=chr(m)

print(r)

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

ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    n=ii()
    S=list(input())
    for s in S: print(chr(ord(s)+n-26) if ord(s)+n>90 else chr(ord(s)+n), end='')
    print()

if __name__ == "__main__":
    main()

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

ans = ""
asc_a = ord("A")

for si in S:
  asc = ord(si)
  asc = asc_a + (asc - asc_a + N)%26
  ans += chr(asc)
  
print(ans)

Solution (Python):

inc = int(input())
string = input()

for n in string:
    print(chr((ord(n) + inc - 65) % 26 + 65), end="")

print()

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

Solution (Python):

import string

alphabet = string.ascii_uppercase + string.ascii_uppercase

n_steps = int(input())
row_text = input()
processed_tuple = (alphabet[alphabet.index(x)+n_steps] for x in row_text)
print(*processed_tuple, sep = '')

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

n = len(S)
for j in range(0, n):
    k = alp.index(S[j])
    x = (k + N) % 26
    r = r + alp[x]

print(r)

Solution (Python):
N=int(input())
S=input()
T=''
a='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(S)):
    for j in range(26):
        if S[i]==a[j]:
            T+=a[j+N]
print(T)

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

for i in range(len(S)):
    for k in range(26):
        if S[i] == AtoZ[k]:
            Ans += AtoZ[(k+N)%26]
    
print(Ans)

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

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

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

print("".join(C))

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

Solution (Python):
from sys import stdin

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


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']
s = ""

for c in char:
    arr_num = int(al.index(c.lower()))

    if  arr_num + n > 25:
        s += al[arr_num + n - 26]
    else:
        s += al[arr_num + n]

print(s.upper())

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

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

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

alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
di = {}
for i in range(len(alp)):
    di[alp[i]] = i
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


ans = []
for s in S:
    ans.append(alp[di[s]+N])

print(''.join(ans))

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    ans=[]
    for s in input():
        k=(ord(s)-ord('A')+n)%26+ord('A')
        ans.append(chr(k))

    print(''.join(ans))
resolve()

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

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
assert len(alphabet) == 26

d = {char:alphabet.index(char) for char in alphabet}

new_string = ""
for char in string:
    new_string += alphabet[(d[char] + num) % 26]
print(new_string)

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

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

ans = ''
for i in range(len(s)):
    ans += s[i]

print(ans)

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

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

print()

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

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

Solution (Python):
num = int(input())
str_input = input()
str_arr = list(str_input)

for i in range(len(str_arr)):
    if ord(str_arr[i]) + num <= ord("Z"):
        str_arr[i] = chr(ord(str_arr[i]) + num)
    else:
        str_arr[i] = chr(ord(str_arr[i]) - ord("Z") + ord("A") + num - 1)
print("".join(str_arr))

Solution (Python):
t = lambda c: ord(c) - ord('A') + 1
h = lambda c: chr(c+64)
n = int(input())
a = input()
l = list(a)
f = []
for i in l:
    p = int(t(i))
    j = p+n
    while j >26:
        j-=26
    b = h(j)
    f.append(b)
print("".join(f))

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

Solution (Python):
n=int(input())
s=input()
if n==0:
    print(s)
else:
    m=len(s)
    ch=''
    for i in range(m):
        a=ord(s[i])+n
        if a>90:
            b=65+a-91
            b=chr(b)
            ch+=b
        else:
            ch+=chr(a)
    print(ch)

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

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

for i in range(len(S)):
    num = alf.index(S[i])
    ans.append(alf[num + N])


print(''.join(ans))

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

ret = []
for x in S:
    c = ord(x) + N
    if c <= 90:
        ret.append(chr(c))
    else:
        ret.append(chr(c - 26))

print("".join(ret))

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

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

word = []

for i in range(len(s)):
  num = alp.index(s[i])
  word.append(alp[num + n])
              
print(*word, sep='')

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

a = ord("A")
ans = ""

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

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']
ma = 26

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

res = ''

for a in s:
    index = alpha.index(a) + n
    
    if index >= ma:
        index = index % ma
    
    res  += alpha[index]

print(res)

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

string = {c:i for i,c in enumerate(ascii_uppercase)}
res = ""
for c in S:
    res += ascii_uppercase[(string[c]+N)%26]
print(res)

Solution (Python):
N=int(input())
S=input()
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for s in S:
    for j in range(len(alphabet)):
        if s == alphabet[j]:
            ans += (alphabet[(j+N)%26])
print(ans)

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

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

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

Solution (Python):

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


slist = list(s)

for i in range(len(slist)):
    t = ord(slist[i]) + n

    if t > ord("Z"):
        t -= 26
    slist[i] = chr(t)


print("".join(slist))

Solution (Python):
n = int(input())
s = input()
s = [ord(c) + n for c in s]
s = [chr(c) if ord('A') <= c <= ord('Z') else chr(c - ord('Z') + ord('A') - 1) for c in s]
print(''.join(s))

Solution (Python):
N = int(input())
S = input()
ans = ''
for s in S:
    ss = ord(s)
    while (ss+N>ord('Z')):
        ss -= 26
    ans += chr(ss+N)
print(ans)

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

for i in range(len(s)):
    ascii = ord(s[i])
    if((ascii+n)>90):
        print(chr(64+(ascii+n-90)),end='')
    else:
        print(chr(ascii+n),end='')

Solution (Python):
l = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

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

print(''.join([l[(l.index(x) + n) % 26] for x in s]))

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

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

ABC = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
  if ABC.index(S[i])+1 + N <= 26:
    S[i] = ABC[ABC.index(S[i]) + N]
  else:
    S[i] = ABC[ABC.index(S[i]) + N - 26]

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

Solution (Python):
n = int(input())
s = input()
fin = ''
for i in range(len(s)):
  t = ord(s[i])-ord('A')+n 
  if (t > 25):
    fin += chr(ord('A')+t-26)
  else:
    fin +=chr(ord('A')+t)
print(fin)

Solution (Python):
z="ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
n=int(input())%26
s=input()
out=[]
for a in s:
    out.append(z[z.find(a)+n])
print("".join(out))

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

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

print(ans)

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

Solution (Python):
n = int(input())
s = input()
s_list = list(s)
alphabet = [chr(ord('a') + i) for i in range(26)]

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

Solution (Python):
alpha2int = lambda x: ord(x) - ord("A") + 1
def int2alpha(x):
    if  x % 26 != 0:
        x = x % 26 
    else:
        x = 26
    return chr(x + 64)

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

out_s = ""
for i in range(len(S)):
    out_s += int2alpha(alpha2int(S[i]) + N)
    
print(out_s)

Solution (Python):


n = int(input())
strings = input()

newStr = ''
for i in range(len(strings)):
    nextAlpha = ord(strings[i]) + n
    if nextAlpha <= 90:
        newStr += chr(nextAlpha)
    else:
        nextAlpha -= 91
        newStr += chr(65 + nextAlpha)
        
print(newStr)

Solution (Python):
from collections import Counter

mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft



def main():
    n = int(input())
    s = input()
    for i in s:
        a = ord(i) - ord('A')
        a = (a + n) % 26
        print(chr(a + ord('A')), end='')
    print()

main()

Solution (Python):
n = int(input())
s = input()
new_s = ''
alpha2num = lambda x: ord(x)-65
num2alpha = lambda x: chr(x+65)
for i in s:
    tmp = alpha2num(i) + n
    tmp %= 26
    new_s += num2alpha(tmp)
print(new_s)

Solution (Python):
import string
n=int(input())
s=input()
atoz=string.ascii_uppercase+string.ascii_uppercase
ans=""
for i in s:
    ans+=atoz[atoz.index(i)+n]
print(ans)

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

def change(c):
    x = ord(c) - ord("A") + n
    x %= 26
    return chr(ord("A") + x)

ans = ""
for i in s:
    ans += change(i)
print(ans)

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

Solution (Python):
def mainFunc():
    alphabets = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
    N = int(input())
    S = list(input())
    ans = ''

    for s in S:
        n = (alphabets.index(s) + N) % 26
        ans += alphabets[n]
    
    print(ans)

mainFunc()

Solution (Python):
import string

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

letters = string.ascii_uppercase + string.ascii_uppercase
letters = letters[N:N+26]
mapping = {s: letters[idx] for idx, s in enumerate(string.ascii_uppercase)}

ans = "".join(map(lambda s: mapping[s], S))
print(ans, flush=True)

Solution (Python):
N = int(input())
S = input()
A = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
SS = list(S)
for i in range (len(S)):
  if A.index(S[i]) + N >= 26:
    SS[i] = A[int(A.index(S[i])+N-26)]  
  else:
    SS[i] = A[int(A.index(S[i])+N)]
SS = "".join(SS)
print(SS)

Solution (Python):
n=int(input())
s=input()
a="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s=list(s)
a=list(a)
for i in range(len(s)):
    if a.index(s[i]) + n >= 26:
        s[i]=a[int(a.index(s[i])+n-26)]
    else:
        s[i]=a[int(a.index(s[i])+n)]
s="".join(s)
print(s)

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

s = str(input())

cc = ""

m = len(s)

for i in range(m):
    if ord(s[i]) + n <= 65 + 25:
        cc += (chr(ord(s[i]) + n))
    else:
        cc += (chr(ord(s[i]) + n - (65 + 25) + 64))

print(cc)

Solution (Python):
s = input()

N = int(s)

s = input()

S = s

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

print(r)

Solution (Python):
def change_c(n,x):
    id_ = ord(x) + n
    if id_>90:
        id_ = 64 + (id_-90)
    return chr(id_)

n=int(input())
s=input()
print("".join(change_c(n,c) for c in s))

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

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

change_list = []
for alpha in [i for i in S]:
    num = alpha2num(alpha)
    if num + N > 26:
        num = num + N - 26
    else:
        num = num + N
    change_list.append(num2alpha(num))

print(''.join(change_list))

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

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

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

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

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

print(out)

Solution (Python):
def solve(string):
    n, s = string.split()
    b = ord("A")
    return "".join([chr(((ord(_s) - b + int(n)) % 26) + b) for _s in s])


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Solution (Python):
N = int(input())
S = list(input())
ans = []
abc = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q","r", "s", "t", "u", "v", "w", "x", "y", "z"]
for i in range(len(S)):
    for j in range(len(abc)):
        if S[i] == abc[j].upper():
            if j + N < 26:
                ans.append(abc[j + N])
            else:
                ans.append(abc[j + N -26])


print("".join(ans).upper())

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

num = int(input())
letter = list(input())
for i in range(len(letter)):
    n = alphabet.index(letter[i])
    o = n + num
    if o > 25:
        letter[i] = alphabet[o - 26]
    else:
        letter[i] = alphabet[o]
print(''.join(letter))

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

base_num = ord('A')
for i, s in enumerate(S):
    S[i] = chr((ord(s) - base_num + N) % 26 + base_num)

print(''.join(S))

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


N=int(input())
S1=list(input())

S2=[]
for s in S1:
  ind=ALP.index(s)
  S2.append(ALP[(ind+N)%26])
  
print("".join(S2))

Solution (Python):
if __name__ == '__main__':

	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:
		ans += A [ ( A.index(i) + N ) % 26 ]

	print(ans)

Solution (Python):
n = int(input())
b = list(str(input()))
ln = [chr(i) for i in range(65,65+26)]

ans = []
for i in range(len(b)):
    for j in range(len(ln)):
        if b[i] ==  ln[j]:
            if (25 - j) >= n:
                ans.append(ln[j + n])
            else:
                ans.append(ln[j + n - 26])
print(''.join(ans))

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

for i in range(len(S1)):
    if (ord(S1[i]) + N) < 91:
        S1[i] = chr(ord(S1[i]) + N)
    else:
        S1[i] = chr((ord(S1[i])+N-65)%26+65)
S = ''.join(S1)
print(S)

Solution (Python):
def main():
   n = input()
   data = list(input())
   for i in data:
      a = ord(i) + int(n)
      if a > ord("Z"):
         a = a + ord("A") - ord("Z") - 1
      print(chr(a),end = "")

if __name__==  "__main__":
   main()

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

stdata = [chr(s) for s in range(ord("A"),ord("Z") + 1)]
ans = []
for i in range(len(s)):
  ind = stdata.index(s[i])
  ind = (ind + n) % 26
  ans.append(stdata[ind])
for i in range(len(s)):
  print(ans[i],end="")

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

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

res = ''

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

print(res)

Solution (Python):
N=int(input())
S=input()
A="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=""
for i in S:
    ans+=A[A.index(i)+N]
print(ans)

Solution (Python):
s = int(input())
f = input()
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in f:
  ans += a[a.index(i)+s]

print(ans)

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

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

Solution (Python):
shift = int(input())
print("".join(chr(ord("A") + (ord(c) - ord("A") + shift) % 26) for c in input()))

Solution (Python):
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

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

i = 0
for j in S:
    S[i] = alphabets[(alphabets.index(j) + N) % 26]
    i += 1

print("".join(S))

Solution (Python):

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

S = list(S)

j = 0
for s in S:
    a = ord(s)
    for i in range(0, N):
        if chr(a) != 'Z':
            a = a + 1
            S[j] = chr(a)
        else:
            a = a - 25
            S[j] = chr(a)
    j = j + 1

S = ''.join(S)

print(S)

Solution (Python):
stringline=[]
addnum=int(input())
stringline=input()
for i in range(len(stringline)):
    if 'A' <= stringline[i] and stringline[i] <= 'Z':
        print(chr((ord(stringline[i]) - ord('A') + int(addnum)) % 26 + ord('A')),end="")

Solution (Python):
def main():
    N = int(input())
    S=[i for i in input().rstrip()]
    ans_list=[]
    for s in S:
        data = int(ord(s))+N
        if data >= 91:
            data = data -26
        ans_list.append(chr(data))
    print(''.join(ans_list))





if __name__ == "__main__":
    main()

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

ans = ''

for i in range(len(s)):
    index = (alps.index(s[i]) + n) % 26
    ans += alps[index]

print(ans)

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

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

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

ans = ''

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

print(ans)

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

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in range(len(s)):
  s[i] = alpha[(int(alpha.index(s[i]))+n)%26]

print(''.join(s))

Solution (Python):

import sys
INF = float("inf")


def solve(N: int, S: str):
    abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    print("".join([abc[(abc.index(c)+N) % 26] for c in S]))
    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):
n = int(input())
s = list(input())
for i in range(len(s)):
    if ord(s[i]) + n <= 90:
        s[i] = chr(int(ord(s[i])) + n)
    else:
        s[i] = chr(65 + int(ord(s[i]) + n) - 91)
print("".join(s))

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

t = ""
for i in s:
    t += chr((ord(i) + n) % 65 % 26 + 65)

print(t)

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

t = ""
for i in s:
    x = ord(i) + n
    if x < 91:
        t += chr(x)
    else:
        t += chr(x - 26)

print(t)

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

Solution (Python):
n = int(input())
alp_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
s = input()
ans = ""
for i in s:
    ind = alp_list.index(i)
    upd_ind = ind + n
    if upd_ind >= 26 and n != 0:
        upd_ind -= 26
    ans += alp_list[upd_ind]

print(ans)

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

Solution (Python):
word = {'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}
word_reverse={v: k for k, v in word.items()}
x=input()
y=input()
Ans=''
for i in y:
  if word[i]+int(x) > 25:
    z = (word[i]+int(x)) % 26
  else:z=word[i]+int(x)
  Ans=Ans+word_reverse[z]

print(Ans)

Solution (Python):
N=int(input())
S=input()
ans=[]
def Cha(x, N):
    a=(ord(x)+N)%26
    if a in range(0,13):
        return(chr(a+78))
    if a in range(13, 26):
        return(chr(a+52))
for i in range(len(S)):
    ans.append(Cha(S[i], N))
print(''.join(ans))

Solution (Python):
import sys, os
import collections

MOD = 10 ** 9 + 7


alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def solve(input_stream):
  N = read_int(input_stream)
  S = input_stream.readline().strip()

  ans = ""
  for char in S:
    index = alphabet.find(char)
    ans += alphabet[ (index + N) % len(alphabet)]
  return [ans]

def read_ints(input_stream):
  return [i for i in map(int, input_stream.readline().strip().split())]

def read_int(input_stream):
  return int(input_stream.readline().strip())


if __name__ == "__main__":
    outputs = solve(sys.stdin)
    for line in outputs:
      print(line)

Solution (Python):
N = int(input())
S = str(input())
result=""
for c in S:
    if ord('A') <= ord(c) <= ord('Z'):
        result =  result+chr(abs(((ord(c) + N - ord('A')) % 26)) + ord('A'))
    else :
        result =  result+chr(abs(((ord(c) + N - ord('A')) % 26)) + ord('A'))
print(result)

Solution (Python):
from functools import reduce


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


if __name__ == '__main__':
    do_code()

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

for ch in S:
    diff = (ord(ch) - ord('A') + N) % 26
    print(chr(ord('A') + diff), end='')
print()