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



Sample input:
2
ABCXYZ


Sample output:
CDEZAB

Submission status: Runtime Error

Solution code:
function rot (n, c) {
  const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  return alpha.charAt((alpha.indexOf(c) + n) % 26)
}

function main (input) {
  const line = input.split('\n')
  const n = parseInt(line[0], 10)
  const s = line[1]
  const ss = s.split('')

  console.log(ss.map((x) => rot(n, x)).join(''))
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))

Submission status: Runtime Error

Solution code:
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 range(len(S)):
  ans += a[(ord(S[i])-ord('A')+N)%26]
print(ans)

Submission status: Runtime Error

Solution code:
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 range(len(S)):
  ans += S[(i+N)%26]
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    n=int(input())
    s=input()
    sum=''
    model='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
    m=list(model)
    for i in range(len(s)):
        now=m.index(s[i])
        sum=sum+m[now+n]
    print(sum)


if __name__=='__main__':
    main()   def main():

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
rot = []
for i in s:
  pos = alphabet.find(i)
  pos = int(pos) + n
  if pos > 26:
    pos = int(pos) - 26
  rot.append(alphabet[pos])
strout = "".join(rot)
print(strout)

Submission status: Runtime Error

Solution code:
a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
b=int(input())
s=input()

for i in s:
    b=a.index(i)+N
    if b<=25:
        print(a[b],end="")
    else:
        print(a[b-26],end="")

Submission status: Runtime Error

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


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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
abc_list="abcdefghijklmnopqrstuvwxyz"
L=len(abc_list)
ans= " "
for i in S:
  ans += abc_list[(abc_list.index(i)+N) % L]
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
S=str(input())
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
  S[i] = (letters.index(S[i])+N)%26
print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
  
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
f = ''
 
for i in range(len(s)):
    for j in range(26):
        m = i + n
        if m >= 26:
            m -= 26
        if s[m] == alp[j]:
            f += alp[j]
print(f)

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
  
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
f = ''

for in range(len(s)):
    for j in range(26):
        if s[i] == alp[j]:
            f += alp[j]
print(f)

Submission status: Runtime Error

Solution code:
ls = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
dic = {"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":26}

n = int(input())
s = input()
ans = ""
for i in range(len(s)):
  ans += ls[dic[s[i]]+n-1]
print(ans)

Submission status: Runtime Error

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

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

    
print("".join(map(str,S)))

Submission status: Runtime Error

Solution code:
N=int(input().split())
S=list(input())
#65~90
for i in range(len(S)):
  S[i]+=N
  S[i]=(S[i]%26)+65
print("".join(S))

Submission status: Runtime Error

Solution code:
s = input()
nl = len(s)

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_new = []

for i in range(nl):
    newnumber = alp.index(s[i])+n
    if newnumber > 25:
        newnumber = newnumber - 26
    newi = alp[newnumber]
    s_new.append(newi)

s_ans = ""
for i in range(nl):
    s_ans += s_new[i]
print(s_ans)

Submission status: Runtime Error

Solution code:
N = input()
S = input()
out = ""
for i in S:
  num = ord(i)
  num = num + N
  print(num)
  out.append(chr(num))

print(out)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

s = input()

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

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

Submission status: Runtime Error

Solution code:
s = input()

n = int(input())

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
AL=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",]
n=input()
s=input()
if i in range(len(s)):
  s[i]=AL[n+AL.index(s[i])]
print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
a="abcdefghijklmnopqrstuvwxyz"
ans=''
for i in S:
  num = a.index(i) + N
  if(num > 25):
    num -= 26
  ans += a[num]
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
s.pop(n)
print(s.append(s.pop(n)))

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
s.pop(n)
print(s.append(s.pop(n)))

Submission status: Runtime Error

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())
s = input()
ans = []
for i in range(s):
    ans.append(chr((ord(i)-ord('A')+n)%26 + ord('A')))

print(''.join(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
ans = ""
for i in s:
  j = ((ord(i)-ord("A")) + n )//26 
'''
ord(D)-ord(A) = 68-65 = 3
n文字進める 3+n
26で割ることでたとえ3+nがAsciiコードの範囲を超えても大丈夫
'''
  ans += j
print(chr(ans))

Submission status: Runtime Error

Solution code:
#整数の入力
N = int(input())
#文字列の入力
S = input()

#listを一文字ずつのlistに
S_list = list(S)

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

Submission status: Runtime Error

Solution code:
#整数の入力
N = int(input())
#文字列の入力
S = input()

#listを一文字ずつのlistに
S_list = list(S)

ans = ""
for i in range(len(S_list)):
  ans = ans + S_list[N+i]
  
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(N):
    a0 = a[0]
    a.remove(a0)
    a.append(a0)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
cnt=len(s)
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(cnt):
  ans=ans+a[i+n]
print(ans)

Submission status: Runtime Error

Solution code:
t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
n=int(input())
print(t[t.index(input())+n])

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
if int(ord(s)) + n > 122:
    print(chr(int(ord(s)) + n - 26))
else:
    print(chr(int(ord(s)) + n))

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
if int(ord(s)) + n > 122:
    print(chr(int(ord(s)) + n - 26))
else:
    print(int(ord(s)) + n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from EmurateInput import input

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

Submission status: Runtime Error

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

t=str()

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

print(t)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


N = int(readline())
S = [int(x) - ord("A") for x in read().rstrip]
N = int(readline())

S = [(x + N) % 26 for x in S]

anser = "".join(chr(x + ord("A")) for x in S)

print(anser)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


N = int(readline())
S = [int(x) - ord("A") for x in read().rstrip]
N = int(readline())

S = [(x + N) % 26 for x in S]

anser = "".join([chr(x + ord("A")) for x in S])

print(anser)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
s_len=len(s)
ans=""
for i in range(s_len):
    char=97+(ord(s)+n)%26
    ans+=chr(char)
print(ans)

Submission status: Runtime Error

Solution code:
n= int(input())
s = input()
al='ABCDEFGHIJKLMNOPQRSTUVXXYZ'
print(''.join([al[-len(al)+al.index(i)+n] for i in s]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
st = input()
ans_st = ""

for i in range(N):
  ch_ord = ord(st[i])
  if ch_ord + N > 122:
    ans_st += chr(ch_ord + N - 26)
  else:
    ans_st += chr(ch_ord + N)
print(ans_st)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVXYZ"
print(''.join([d[(d.index(i) + n) % 26] for i in s]))

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVXYZ"
print("".join([d[(d.index(i)+n)%26] for i in s]))

Submission status: Runtime Error

Solution code:
N=int(input())
S,T=input().split()
A=[]
for s,t in  zip(S,T):
  A.append(s+t)
print(write(A))

Submission status: Runtime Error

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

ans=""
for x in range(len(S)):
    nc=ord(N[x])
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

Submission status: Runtime Error

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

ans=''
for x in S:
    nc=ord(N[x])
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

Submission status: Runtime Error

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

ans=''
for x in range(len(S)):
    nc=ord(N[x])
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

Submission status: Runtime Error

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

ans=''
for x in S:
    nc=ord(N[x])+N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

Submission status: Runtime Error

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

ans=''
for x in range(len(S)):
    nc=ord(N[x])+N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)

Submission status: Runtime Error

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

ans=''
for x in range(len(S)):
    a=ord(N[x])+N
    if a>90:
        a=a-26
    b=chr(a)
    ans+=b
print(ans)

Submission status: Runtime Error

Solution code:
print(chr(ord(S[i]) + N - 90 + 65), end="")

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

for i in range(len(S)):
    if (ord(S[i]) + N) > 90:
        print(chr(ord(S[i]) + N - 90 + 64), end="")
    else:
        print(chr(ord(S[i]) + N ), end="")

Submission status: Runtime Error

Solution code:
import string
import numpy as np
N = int(input())
S = list(input())
A2Z = string.ascii_uppercase

str_index = np.full(len(S), 0)
mod26 = np.full(len(S), 26)
#print(str_index)

for i in range(len(S)):
    str_index[i] = A2Z.index(S[i])
str_index = (str_index+N) % mod26
#print(str_index)

tmp = ['']*len(S)
for i in range(len(S)):
    tmp[i] = A2Z[str_index[i]]
answer = ''.join(tmp)
print(answer)

Submission status: Runtime Error

Solution code:
n=int(input())
s=ord(input())

ans=s-65+n
if ans>=26:
  ans=ans%26
print(chr(ans+65))

Submission status: Runtime Error

Solution code:
s=ord(input())
n=int(input())
ans=s-65+n
if ans>=26:
  ans=ans%26
print(chr(ans+65))

Submission status: Runtime Error

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

ans = ""

for x in S
	num=(ord(x) + N)
  	if num >90:
    	num=64+num%90
    ans += chr(num)
print(ans)

Submission status: Runtime Error

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

ans = ""

for x in range(S)
	num=(ord(x) + N)
  	if num >90:
    	num=64+num%90
    ans += chr(num)
print(ans)

Submission status: Runtime Error

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

ans = ''

for x in range(S)
	num=(ord(x) + N)
  	if(num >90):
    	num=64+num%90
    ans += chr(num)
print(ans)

Submission status: Runtime Error

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

ans = ""

for x in range(S)
	num=(ord(x) + N)
  	if(num >=90):
    	num=64+num%90
    ans += chr(num)
print(ans)

Submission status: Runtime Error

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

ans = ''

for x in range(S)
	num=(ord(x) + N)
  	if(num >=90):
    	num=64+num%90
    ans += chr(num)
print(ans)

Submission status: Runtime Error

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

s = ""

for i in range(S):
  s+=S[i+N]
  
  
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ANS = ""

for MOJI in S:
  i = ord(MOJI) + N
  if i > 90:
    i = i - 26
  ANS.append(chr(i))

Submission status: Runtime Error

Solution code:
# the uppercase letters are encoded as 65 to 90
# I want to put A as 0, so Z is 25

def letter_to_int(letter):
    return ord(letter)-65


def int_to_letter(encoded_value):
    return chr(encoded_value+65)


def shift_string(N, string):
    shifted_string = ""
    for char in string:
        encoding = letter_to_int(char)
        # mod ensures it wraps around, eg N=3 sends Z to C
        shifted = (encoding+N)%26
        decoded_to_letter = int_to_letter(shifted)
        shifted_string = shifted_string + decoded_to_letter
    return shifted_string


if __name__ == "__main__":
    test1 = \
"""2
ABCXYZ"""
    test2 = \
"""0
ABCXYZ"""
    test3 = \
"""13
ABCDEFGHIJKLMNOPQRSTUVWXYZ"""
    various_tests = [test1, test2, test3]
"""    for test in various_tests:
        lines = test.split("\n")
        N = int(lines[0])
        string = lines[1]
        print(shift_string(N, string))"""
    N = int(input())
    string = input()
    print(shift_string(N, string))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
for i in range(len(S)):
  moji = S[i]
  S[i] = chr(ord(moji)+N)
print(S)

Submission status: Runtime Error

Solution code:

N=int(input())
S=list(input())
a=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
res=''
for s in S:
  code=a[i]+N
  if code>a.index('z'):
    code-=(a.index('z')-1)
  res+=code
print(res)

Submission status: Runtime Error

Solution code:
a=int(input())
c=list(input())
d=''
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=23+a:
    
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
for i in range(len(c)):
  d+=c[i]
print(d)

Submission status: Runtime Error

Solution code:
a=int(input())
c=list(input())
d=''
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=26:
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
for i in range(len(c)):
  d+=c[i]
print(d)

Submission status: Runtime Error

Solution code:
a=int(input())
c=list(input())
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+a<=26:
    c[i]=b[b.index(c[i])+a]
  else:
    c[i]=b[27-(b.index(c[i])+a)]
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'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':26}

number_alphabet = {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 in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))

Submission status: Runtime Error

Solution code:
A=[chr(i) for i in range(65, 65+26)]
N=int(input())
S=str(input())

for i in range(len(S)):
  k=(A.index(S[i])+N)%26
  S[i]=S[k]
  
print(S)

Submission status: Runtime Error

Solution code:
def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return chr(64+num%26)
      
a = input()
b = int(input())
lista = list(a)

for i in range(len(lista)):
  tmp = alpha2num(lista[i])
  tmp += b
  lista[i] = num2alpha(tmp)
  
print(''.join(lista))

Submission status: Runtime Error

Solution code:
al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())

for i in range(len(S)):
  x = al.index(S[i])
  c = x+N
  if c <= 25:
      S[i] = al[c]
  else:
      S[i] = al[c-25]
      
print("".join(S))

Submission status: Runtime Error

Solution code:
al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())

for i in range(len(S)):
  x = al.index(S[i])
  c = x+N
  if c < 25:
      S[i] = al[c]
  else:
      S[i] = al[c-25]
      
print("".join(S))

Submission status: Runtime Error

Solution code:
al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())

for i in S:
  x = al.index(S[i])
  c = x+N
  if c < 25:
      S[i] = al[c]
  else:
      S[i] = al[c-25]
      
print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
x = []
import string
a = list(string.ascii_uppercase)
for i in s:
    b = a.index(i)
    x.append(a[b + n])
    
print(''.join(x))

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
a = []
s_list = list(s)
for i in range(len(s)):
    if i + 1 < len(s) - n: 
        w = s_list[i + n]
    else:
        w = s_list[i + n - len(s)]
    a.append(w)
print("".join(a))

Submission status: Runtime Error

Solution code:
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
S = input()
N = int(input())

for i in S:
  b = a.index(i) + N
  if b<=25:
    print(a[b], end="")
  else:
    print(a[b-26], end="")

Submission status: Runtime Error

Solution code:
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
S = input()
N = int(input())

for i in S:
  b = a.index(i) + N
  if b<=25:
    print(a[b], end="")
  else:
    print(a[b-25], end="")

Submission status: Runtime Error

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

for i in s:
    if ord(i)+N > 90:
        list.append(chr(ord(i)+N-26))
    else:
        list.append(chr(ord(i)+N))
        
ans = "".join(list)
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZabcdefghijklmnopqrstuwvxyz"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
ans=ans.upper()
print("".join(ans))

Submission status: Runtime Error

Solution code:
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[int(a_list.index(s[i]))+n])
print("".join(ans))

Submission status: Runtime Error

Solution code:
s = input()
n = int(input())
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
a_list=[]
for j in a:
	a_list.append(j)
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
print("".join(ans))

Submission status: Runtime Error

Solution code:
s = input()
n = int(input())
ans=[]
a_list = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
for i in range (len(s)):
	ans.append(a_list[a_list.index(s[i])+n])
print("".join(ans))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
A = []
 
for c in S:
  i = L.find(c)
  A.append(L[(i + n)%26])
  
print(''.join(A))

Submission status: Runtime Error

Solution code:
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']
A = []

for c in S:
  i = Alphabet.find(c)
  A.append(Alphabet[(i + n)%26])
  
print(''.join(A))

Submission status: Runtime Error

Solution code:
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())
li=list(input())
for i in li:
  num=a.index(i)+N
  if num > 26:
    num-=26
  print(a[num],end="")

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
alp = 'abcdefghijklmnopqrstuvwxyz' * 2
ss = ''

for i in range(len(s)):

    ss += str(alp[alp.index(s[i])+n])

print(ss)

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
alp = 'abcdefghijklmnopqrstuvwxyz' * 2
lst = []

for i in range(len(s)):

    lst.append(str(alp[alp.index(s[i])+n]))

print(''.join(lst))

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input())
alp = 'abcdefghijklmnopqrstuvwxyz' * 2
lst = []

for i in range(len(s)):

    lst.append(alp[alp.index(s[i])+n])

print(''.join(lst))

Submission status: Runtime Error

Solution code:
n=int(input())
a=input()
b=""   
for i in range (len(a)):
  if((a[i]+n)>=92):
    b=b+str(65+a[i]+n-91);
  else:    
    b+=str(a[i]+n);
print(b)

Submission status: Runtime Error

Solution code:
n=int(input())
a=input()
b=""   
for i in range len(a):
  if((a[i]+n)>=92):
    b=b+str(65+a[i]+n-91);
  else:    
    b+=str(a[i]+n);
print(b)

Submission status: Runtime Error

Solution code:
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+'')

Submission status: Runtime Error

Solution code:
S = input()
N = int(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]
print("".join(sli))

Submission status: Runtime Error

Solution code:
S = input()
N = 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+2]
print("".join(sli)

Submission status: Runtime Error

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

ans = []
for i in range(N, len(S)):
    ans.append(S[i])

for i in range(N):
    ans.append(S[i])

print(''.join(ans))

Submission status: Runtime Error

Solution code:
aa

Submission status: Runtime Error

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

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

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

print(ans)

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
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(S)}

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
for i in range(len(s)):
  s[i]=str(int(s[i])+n)
print(s)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
for i in range(len(s)):
  s[i]+=n
print(s)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
string = ''
alpha = lambda c: ord(c) - ord('A') + 1
num = lambda c: chr(c+64)
for i in S:
  a = alpha(i) % N
  string += num(a)
print(string)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
string = ''
alpha = lambda c: ord(c) - ord('A') + 1
num = lambda c: chr(c+64)
for i in S:
  a = alpha(i) % N
  string.append(num(a))
print(string)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
string = ''
alpha = lambda c: ord(c) - ord('A') + 1
num = lambda c: chr(c+64)
for i in S:
  a = arpha(i) % N
  string.append(num(a))
print(string)

Submission status: Runtime Error

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

alpha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

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

print(''.join(s))

Submission status: Runtime Error

Solution code:
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 x:
  Ans=Ans+word_reverse[word[i]+int(y)]

print(Ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#i = int(input())
#s = input()
i = 13
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
en = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
s_list = [(en[(en.index(k)+i)%26]) for k in s]
print(''.join(s_list)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,S = int(input()),input()
ans = ""
abc = "ABCDEFGHIGKLMNOPQRSTUVWXYZ"
for i in S:
  ans += abc[(abc.index(i)+N)%26]
print(ans)

Submission status: Runtime Error

Solution code:
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
list = list(alphabet)
k=int(input())
str = input()
str_list = list(str)
new_str_list = list()
for str in str_list:
  new_str_list.append(list[(list.index(str)+k) % 26])
new_str = ''
for b in new_str_list:
  new_str += b
print(new_str)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
arg1 = input()
arg2 = input().split()
arg3 = int(arg1) + int(arg2[0]) + int(arg2[1])
arg4 = input()
print ( str(arg3) + ' ' + arg4)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
using namespace std;

int main()
{
  int n;
  string s;
  cin >> n;
  cin >> s;
  for (auto &one : s)
  {
    int tmp = (one - 'A' + n) % 26;
    one = 'A' + tmp;
  }
  cout << s << endl;
}

Submission status: Runtime Error

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

L = ['ABCDEFGHIJKLMNOPQRSTUVWXZ']

ptint(index(L[0]))

Submission status: Runtime Error

Solution code:
str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 

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

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

    if c > 27:
        c = c - 26
    ans = ans + str[c] #文字列は加算できる

print(ans)