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

codes = []

henkan = []

s = ""

for i in range(len(S)):
    codes.append(ord(S[i])-ord("A"))

for i in range(len(S)):
    henkan.append((codes[i] + N)%26 + ord("A"))

for i in range(len(S)):
    s += chr(henkan[i])

print(s)

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

Solution (Python):


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

def _rot13(c):
    if 'A' <= c and c <= 'Z':
        
        return chr((ord(c) - ord('A') + n) % 26 + ord('A'))

    if 'a' <= c and c <= 'z':
        
        return chr((ord(c) - ord('a') + n) % 26 + ord('a'))

    
    return c


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


print(rot13(s))

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

  
for i in range(len(ans)):
  print(ans[i], end = '')

Solution (Python):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
s = ns()

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

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

alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

ans_list = []
for s in S: 
    ans_list.append(alphabet[alphabet.index(s)+N])
print("".join(ans_list))

Solution (Python):
def main():
    n, s = int(input()), input()
    l = [chr(i) for i in range(65, 65+26)]
    sl = []
    for si in s:
        sl.append(l.index(si))
    l = l+l
    sl = list(map(lambda x: x+n, sl))
    o = [l[i] for i in sl]
    print("".join(o))

if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
S=input()
SO=""
for i in range(len(S)):
  a = ord(S[i]) + N
  if ( a > ord('Z') ):
    a = ord('A') + (a-ord('Z')-1)
  SO += chr(a)
print(SO)

Solution (Python):
n = int(input())
s = list(str(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']


ans = ''

for x in s:
    ind = alp.index(x)
    ans += alp[(ind+n)%26]

print(ans)

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


for s in S:
    ans = ord(s) + N

    if ans > 90:
        ans = (ans - 91) + 65

    print(chr(ans), end="")
print()

Solution (Python):
N=int(input())
S=str(input())
L="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s=""
for j in S:
  if L.index(j)+N<=len(L)-1:
    s+=L[L.index(j)+N]
  else:
    s+=L[L.index(j)+N-len(L)]
print(s)

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

al = [chr(i) for i in range(65, 65+26)]
res_list = []
for s in S:
    tidx = al.index(s)
    if 0 <= tidx+N <=25:
        
        res_list.append(al[tidx+N])
    else:
        
        res_list.append(al[abs(25-(tidx+N)) - 1])
print(''.join(res_list))

Solution (Python):
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]



def A():
    s = input()
    if s == 'SUN':
        print(7)
    if s == "MON":
        print(6)
    if s == "TUE":
        print(5)
    if s == "WED":
        print(4)
    if s == "THU":
        print(3)
    if s == "FRI":
        print(2)
    if s == "SAT":
        print(1)
    return



def B():
    al = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    n = I()
    s = S()
    for i in range(len(s)):
        ni = (al.index(s[i]) + n) % 26
        s[i] = al[ni]
    print(''.join(s))
    return



def C():
    return



def D():
    return



def E():
    return



def F():
    return



def resolve():
    B()
    return



if __name__ == "__main__":
    B()

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

def shift(l, k):
  return l[k:] + l[:k]

lish = shift(li,n)
ans = ""
for i in range(len(s)):
  ans += lish[li.index(s[i])]
print(ans)

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

for _s in s:
    asc = ord(_s)
    asc += n
    if asc > 90:
        asc -= 26
    ans += chr(asc)
print(ans)

Solution (Python):
n=int(input())
s=input()
t=[]
u=[]
alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)


for i in range(len(s)):
  t.append(alpha2num(s[i]))

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

  if t[i]>26:
    t[i]-=26
  u.append(num2alpha(t[i]))

mojiretu = ''.join(u)
print(mojiretu)

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

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

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

    print(chr(k), end="")

Solution (Python):

a = int(input())
b = input()

s = ["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(b)):
    index = s.index(b[i])
    out += s[(index+a) % 26]

print(out)

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

abc = [chr(ord('a') + i) for i in range(26)]
ans = []

for c in S:
    ans.append(chr((ord(c)+N-65)%26 + 65))
ans = "".join(ans)
print(ans)

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

print(''.join(result))

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

ans = ''

for i in word:
    askey = ord(i)
    askey += n
    if askey > 90:
        askey = 64 + askey - 90
    ans += chr(askey)

    
print(ans)

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np








inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    N=I()
    A=S()
    al="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    out=""
    for a in A:
        x=al.find(a)
        x+=N
        while x>25:
            x-=26
        out+=al[x]

    print(out)




if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
s = list(input())
a = []
for i in s:
    b = ord(i) + n
    if b > ord('Z'):
        b = b % ord('Z') -1 + ord('A')
    a.append(chr(b))

print(''.join(a))

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

Zorder = ord('Z')
for i in range(len(s)):
    order = ord(s[i]) + n
    if order > Zorder:
        order -= 26
    s_[i] = chr(order)


print(*s_, sep='')

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

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

for c in s:
    i = alpha.index(c)
    ans.append(alpha[(i+n)%26])

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

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'
]
result =''
for s in S:
    target = alphabet.index(s)
    
    tmp = (target+N)%26
    result += alphabet[tmp]
print(result)

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


def f(c):
    r = ord(c) + n
    if 90 < r:
        r = r - (r // 90) * 26
    return chr(r)


r = ''

for i in s:
    r += f(i)

print(r)

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

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = ""
for i, x in enumerate(s):
    for j, y in enumerate(a):
        if y == x:
            index = (j + n) % 26
            ans += a[index]

print(ans)

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

d = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

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

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

def ceaser(s):
    ns=[]
    for word in s:
        ns.append(chr((ord(word) - ord('A') + N) % 26 + ord('A')))

    return "".join(ns)


ans = ceaser(s)
print(ans)

Solution (Python):
n = int(input())
s = list(map(str, 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"
]

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

print("".join(s))

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


Al_ans = []
for i in S:
    n = Al.index(i) + N
    if n > 25:
        n = n - 26
    Al_ans.append(Al[n])
ans = "".join(Al_ans)

print(ans)

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

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

for s in S:
    index = list[s] + N-1
    if index > 25:
        index -= 26
    print(list2[index], end='')

Solution (Python):

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

ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

num_to_char = {}
for i, char in enumerate(ascii_uppercase):
    num_to_char[i] = char

char_to_num = {}
for i, char in enumerate(ascii_uppercase):
    char_to_num[char] = i

ans = []
for char in S:
    num = char_to_num[char]
    num = (num + N) % 26
    ans.append(num_to_char[num])

print(*ans, sep="")

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

for char in S:
  
  added = ord(char)+N
  if added > 90:
    added = 64+added%90
  print(chr(added),end="")

Solution (Python):
import string

n = int(input())
S = input()
alphabets = [s for s in string.ascii_uppercase]

ans = ''
for s in S:
    index = alphabets.index(s) + n
    if index >= 26: ans += alphabets[index - 26]
    else: ans += alphabets[index]

print(ans)

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

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


import sys

def rot_n(c, n):
    if 'a' <= c and c <= 'z':
        return chr((ord(c) - ord('a') + int(n)) % 26 + ord('a'))
    
    if 'A' <= c and c <= 'Z':
        return chr((ord(c) - ord('A') + int(n)) % 26 + ord('A'))
    
    return c

def rot(s, n):
    c = (rot_n(c, n) for c in s)
    print( ''.join(c))

rot(s, n)

Solution (Python):
number = int(input())
letters = input()
new = ""


for letter in letters:
    o = ord(letter)+number
    if o > 90:
        o = o - 90
        o = o + 64
        
        new += chr(o)
    else: new += chr(o)
print(new)

Solution (Python):


def solve():
    N = int(input())
    S = input()
    alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    alp = list(alp)
    ans = ''
    for s in S:
        i = (alp.index(s) + N) % 26
        ans += alp[i]
    print(ans)


if __name__ == '__main__':
    solve()

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

def _rot_n(c, n):
    if 'A' <=c and c <='Z':
        return chr((ord(c)-ord('A') + n) % 26 + ord('A'))
    return c

def rot_n(s, n):
    g = (_rot_n(c, n) for c in s)
    return ''.join(g)

s = rot_n(s, N)
print(s)

Solution (Python):
N = int(input())
S = input()
mys = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

myans = ''

for s in S:
    
    myans += mys[(mys.find(s)+N)%26]

print(myans)

Solution (Python):
n = int(input())
a = input()
b = ''
for a_ in a:
    s = ord(a_)+n
    while s>ord('Z'):
        s = s-ord('Z')+ord('A')-1

    b+= chr(s)
print(b)

Solution (Python):

N = int(input())
S = str(input())
def caesar(s, n):
    ns = []
    for ch in s:
        
        if ('A' <= ch and ch <= 'Z'):
            ns.append(chr((ord(ch) - ord('A') + n) % 26 + ord('A')))
        
        else:
            ns.append(ch)
    return "".join(ns)

result = caesar(S, N)
print(result)

Solution (Python):
N = int(input())
S = input()
def rotn(n, s):
    a = ord(s)+n
    if a>90:
        a = 65 + a-90-1
    return chr(a)
ans = ""
for s in S:
    ans += rotn(N, s)
print(ans)

Solution (Python):
n = int(input())
s = input()
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = []
for i in range(len(s)):
    for j in range(len(alpha)):
        if s[i] == alpha[j]:
            ans.append(alpha[(j+n)%26])
print(''.join(map(str,ans)))

Solution (Python):
alpha = [chr(i) for i in range(65, 65+26)]
a_change = []
n = int(input())
s = input()
for i in range(len(s)):
    moji = s[i]
    ind_moji = alpha.index(moji)
    a_change.append(alpha[(ind_moji+n) % 26])
print("".join(a_change))

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

ans = ""
for v in S:
    c = ord(v) + N
    if c <= ord("Z"):
        ans += chr(c)
    else:
        ans += chr(c - ord("Z") + ord("A") - 1)
print(ans)

Solution (Python):
N = int(input())
S = list(input())
al = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
dic1 = dict(zip(al,list(range(len(al)))))
tmp = []
for i in S:
    tmp.append((dic1[i]+N)%26)
dic2 = dict(zip(list(range(len(al))),al))
ans = []
for j in tmp:
    ans.append(dic2[j])
print(*ans,sep="")

Solution (Python):
shift = int(input())
a = list(map(lambda ch: ord(ch) - ord('A'), list(input())))
for i in range(len(a)):
    a[i] = chr((a[i] + shift) % 26 + ord('A'))
print(''.join(a))

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

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

result=""
for i in range(len(S)):
    idx=w.index(S[i])
    new_idx=(idx+N)%len(w)
    result=result+w[new_idx]

print(result)

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

r = ''
A = ord('A')
Z = ord('Z')
for s in S:
    v = ord(s) + N

    if v - Z > 0:
        r += chr(A + v - Z - 1)
    else:
        r += chr(v)
        
print(r)

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

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


print(ans)

Solution (Python):


def f(C, N):
    return chr((ord(C) + N - 65)%26 + 65)

def main():
    N = int(input())
    S = input()
    
    print(''.join([f(C, N) for C in S]))


if __name__ == '__main__':
    main()

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

x = [chr(i) for i in range(65, 65+26)]*2

[print(x[x.index(i)+n],end="") for i in s]
print()

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

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

print(ans)

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

s = "abcdefghijklmnopqrstuvwxyz"


newS = "".join([chr((ord(a) - ord('A') + N) % 26 + ord('A')) for a in list(S)])

print (newS)

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

s = ""
for i in S:
    t = ord(i) + N
    if t > 90:
        t = t - 26
    s = s + chr(t)

print(s)

Solution (Python):

N = int(input())
S = str(input())
AZ = [chr(i) for i in range(65, 65+26)]
M = ""

for i in S:
    for j in range(len(AZ)):
        if i == AZ[j]:
            i = AZ[(j+N) % 26]
            M += i
            break;

print(M)

Solution (Python):
n=int(input())
s=input()
a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
ans=""
for i in range(len(s)):
    for j in range(26):
        if s[i]==a[j]:
            ans+=a[(j+n)%26]
            break

print(ans)

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

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

print(''.join(s))

Solution (Python):
import string

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

ans = ""

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

print(ans)

Solution (Python):
N = int(input())
S = list(input())
t = ['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 = []
l = len(t)
for s in S:
    i = t.index(s)
    i += N
    if l <= i:
        ans.append(t[i-l])
    else:
        ans.append(t[i])
print(''.join(ans))

Solution (Python):
N = int(input())
S = list(input())
ls = ["A", "B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
for i in range(len(S)):
    for j in range(26):
        if S[i] == ls[j]:
            S[i] = ls[(j+N) % 26]
            break

print(*S, sep = "")

Solution (Python):
n = int(input())
s = input()
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
dictionary = {}
dict_gyaku = {}
for i,a in enumerate(alpha):
    dictionary[a] = i
    dict_gyaku[i] = a
ans = ''
for j in s:
    ans += dict_gyaku[(dictionary[j] + n)%26]
    
print(ans)

Solution (Python):
words = lambda t : list(map(t, input().split()))
n = int(input())
s = input()

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

def conv(c,n):
    co = ord(c)
    co += n
    if co > 90:
        co -= 26
    
    return chr(co)

ans = ""
for c in s:
    ans += conv(c,n)
print(ans)

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

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

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

def main():
	n = INT()
	s = input()
	for x in s:
		p = ord(x) % 65
		q = (p + n) % 26
		print(chr(q + 65), end = '')

if  __name__=='__main__':
    main()

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

alf = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

slide = alf[N:] + alf[:N]

ans = []

for i in S:
    l = alf.index(i)
    t = slide[l]
    ans.append(t)

print("".join(ans))

Solution (Python):
from string import ascii_uppercase as ascii


def main(n: int, s: str):
    ans = ""
    for _s in s:
        ans += ascii[(ascii.index(_s) + n) % 26]

    print(ans)


if __name__ == "__main__":
    n = int(input())
    s = input()

    main(n, s)

Solution (Python):
def deencrypt(str, key):
    plaintext = ""

    for ch in list(str):
        if 'A' <= ch <= 'Z':
            plaintext += chr((ord(ch) - ord('A') + key) % 26 + ord('A'))
        elif 'a' <= ch <= 'z':
            plaintext += chr((ord(ch) - ord('a') + key) % 26 + ord('a'))
        else:
            plaintext += ch

    return plaintext


N = int(input())
ciphertext = input()

print(deencrypt(ciphertext, N))

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

ans = ''

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

print(ans)

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

Solution (Python):

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

s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in range(len(S)):
    n = (s.index(S[i]) + N)
    if n >= 26:
        n -= 26
    ans += s[n]
    
print(ans)

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



if __name__ == "__main__":
    main()

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

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"]
news = ""
for i in range(len(s)):
    for j in range(len(al)):
        if s[i] == al[j]:
            news += al[(j+n)%26]

print(news)

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

def addN(x):
  a=ord(x)+N
  if a > 90:
    a = a -90 + 65 -1
  return chr(a)
  
S=list(map(addN, list(input())))

print(''.join(S))

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

ans = ""

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

print(ans)

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

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

print("".join(T))

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

st = []
for i in range(len(S)):
  if ord(S[i])+N > 90:
    st.append(chr(ord(S[i])+N-26))
  else:
    st.append(chr(ord(S[i])+N))
    
print(''.join(st))

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

alp = "abcdefghijklmnopqrstuvwxyz".upper()
alp *= 2
ans = ""
for i in s:
    ind = alp.index(i)
    ans += alp[ind+n]
print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
N = int(input())
S = list(input())
s = len(S)
for i in range(s):
    k = ord(S[i])-64 + N
    if k>26:
        k -= 26
    S[i] = chr(k+64)
print(''.join(S))

Solution (Python):
import string

N = int(input())
S = input()
tmp = [''] * len(S)

for i in range(len(S)):
    tmp[i] = string.ascii_uppercase.index(S[i])

ans = ''
for i in tmp:
    ans += string.ascii_uppercase[(i + N) % 26]
print(ans)

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

ans = []
for i in range(len(S)):
	t = ord(S[i])
	t += N
	if t > 90:
		t = 65+(t-91)
	ans.append(chr(t))

print("".join(ans))

Solution (Python):
n=int(input())
s=input()
ss=''
for c in s:
    cc=ord(c)+n
    if (cc > ord('Z')):
        cc-=26
    ss+=chr(cc)
print(ss)

Solution (Python):
def main():
    N = int(input())
    S = input()
    x = [chr(i) for i in range(65, 65+26)]
    ans = ''
    for si in S:
        ind = x.index(si)
        next_c = ind + N
        
        if next_c >= 26:
            next_c -= 26
        ans += x[next_c]

    print(ans)



if __name__ == "__main__":
    main()

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    N = int(input())
    S = input()
    logging.info("Hello!")

    answer = ""
    for c in S:
        num = ord(c) + N
        if num <= 90:
            answer += chr(num)
        else:
            num = num - 90 + 64
            answer += chr(num)

    print(answer)
            
if __name__ == "__main__":
    main()

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    N = II()
    S = input()
    for c in S:
        write(chr((ord(c)-ord('A')+N)%26+ord('A')))
    write('\n')





if __name__ == '__main__':
    main()

Solution (Python):
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

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

result = ""
for s in S:
    index = chars.index(s)
    index = (index + N) % 26
    result += chars[index]

print(result)

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

Solution (Python):






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




ALPHA = [chr(ord('A') + i) for i in range(26)]

for i in range(len(S)):
    ind = ALPHA.index(S[i])
    if int(ind) + N > 25 :
        S[i] = ALPHA[int(ind) + N - 26]
    else :
        S[i] = ALPHA[int(ind) + N]
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()

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

converted_list=[]
for s in list(S):
    index=mapping.index(s)
    converted_list.append(mapping[(index+N)%26])

print(''.join(converted_list))

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

SS = ""
for c in S:
    for i in range(26):
        if c == moji[i]:
            SS += moji[(i+N)%26]
            break
print(SS)

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

alphabets = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

out = ''
for c in s:
    idx = alphabets.index(c)
    out += alphabets[(idx + n) % 26]

print(out)

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


if __name__ == '__main__':
    solve()

Solution (Python):
from string import ascii_uppercase 
table = ascii_uppercase + ascii_uppercase

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

ans = ''.join([table[table.index(s) + N] for s in S])

print(ans)

Solution (Python):
s=int(input())
r=input()
result=""
for a in r:
  if ord(a)+s>90:
    result=result+chr(ord(a)+s-26)
  else:
    result=result+chr(ord(a)+s)
print(result)

Solution (Python):
def rotate(N, S):
	words = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	m = len(words)
	ans = ""
	for s in S:
		idx = words.find(s)
		ans += words[(idx + N) % m]
	return ans


if __name__ == "__main__":
	N = int(input())
	S = input()
	print(rotate(N, S))

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

cha = ["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)):
    print(cha[(cha.index(S[i]) + N) % 26],end="")

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

a = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

for i in range(len(s)):
    for j in range(len(a)):
        if s[i] == a[j]:
            s[i] = a[(j + n) % 26]
            break
print(''.join(s))

Solution (Python):
n = int(input())
s = list(input())
AL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

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

print("".join(s))

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

ans = ""
for si in s:
    ans += chr((ord(si) - ord('A') + n) % (ord('Z') - ord('A') + 1) + ord('A'))

print(ans)

Solution (Python):
N = int(input())
S = input()
alpha = [chr(i) for i in range(65,65+26)]
text = []
ans = []
for i in list(S):
    text.append(alpha.index(i))
for i in range(len(S)):
    text[i] = (text[i] + N) % 26
for i in range(len(S)):
    ans.append(alpha[text[i]])
print("".join(map(str,ans)))

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 = list(input())
for i in range(len(s)):
    tmp = ord(s[i]) + n
    if tmp > 90:
        tmp -= 26
    s[i] = chr(tmp)

print(''.join(map(str, s)))

Solution (Python):
k=int(input())
msg=input()
for it in msg:
    print(chr(ord('A')+(ord(it)-ord('A')+k)%26),end="")
print()

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

Solution (Python):
n = int(input())
s = input()
string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
res = ""
for _s in s:
    ind = string.find(_s)
    new_ind = ind + n if ind + n < 26 else (ind + n) % 26
    res += string[new_ind]
print(res)

Solution (Python):
N = int(input())
S = list(input())
lst = ["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] = lst[(lst.index(S[i])+N)%26]
    
print("".join(S))

Solution (Python):
b=int(input())
a=input()
s=["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"]
aa=[]
i=0
for x in a:
    for y in s:
        if y==x:
            aa.append(s[i+b])
            break
        i+=1
    i=0
print(''.join(aa))

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

alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

ans = []

for s in S:
  for i,al in enumerate(alph):
    if s==al:
      ans.append(alph[(i+N)%len(alph)])
      break
ans = ''.join(ans)
print(ans)

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

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

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

print(ans)

Solution (Python):
import string
a=string.ascii_uppercase
n=int(input())
s=input()
ans=""
for i in range(len(s)):
  ans+=a[(a.find(s[i]) + n) % len(a)]
print(ans)

Solution (Python):
N =int(input())
S = list(input())
ans = []
for val in S:
    c = ord(val) + N
    if c > 90:
        c -= 26
    ans.append(chr(c))
print("".join(ans))