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())
a = input()
for c in a:
    next_char = (65 + (ord(c) + n) % 91) if (ord(c) + n) >= 91 else (ord(c) + n)
    print(chr(next_char), end='')

Solution (Python):
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

t = int(input())
a_str = str(input())
answer = ""

a_uniquie = ''.join(set(a_str))

for i in a_str:
  for j in range(26):
    if i == a[j]:
      answer += a[j+t]
      break

print(answer)

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

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 num2alpha(num//26)+chr(64+num%26)

for i in range(len(S)):
    a = alpha2num(S[i])
    a=a+N
    while a>26:
        a=a-26
    S[i]=num2alpha(a)

print(''.join(S))

Solution (Python):
k=int(input())
m = input()
codes = 65                    
kosu = 26                      
leng = len(m)                  
c = ""

for i in range(leng):
    code = ord(m[i])           
    
    sa = code - codes
        
    if sa>=0 and sa<kosu:
    	sa=(sa+k)%kosu
        
    c = c + chr(sa + codes)    
print(c)

Solution (Python):
a=input()
b=input()

list='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=[]

for i in range(len(b)):
    num=(list.index(b[i])+int(a))%26
    ans.append(list[num])
    
ans=''.join(ans)

print(ans)

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

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

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

N = int(input())
i =input()

result = caesar(i, -N)
print(result)

Solution (Python):




alphabets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

n_txt = input()
n = int(n_txt)

s_txt = input()


for s_chr in s_txt:
    pos = alphabets.find(s_chr)
    print(alphabets[pos + n], end='')
print()

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

ans = []

t = n%26

li1 = {0:"A", 1:"B", 2:"C", 3:"D", 4:"E", 5:"F", 6:"G", 7:"H", 8:"I", 9:"J", 10:"K", 11:"L", 12:"M", 13:"N", 14:"O", 15:"P", 16:"Q", 17:"R", 18:"S", 19:"T", 20:"U", 21:"V", 22:"W", 23:"X", 24:"Y", 25:"Z"}
li2 = {"A":0, "B":1, "C":2, "D":3, "E":4, "F":5, "G":6, "H":7, "I":8, "J":9, "K":10, "L":11, "M":12, "N":13, "O":14, "P":15, "Q":16, "R":17, "S":18, "T":19, "U":20, "V":21, "W":22, "X":23, "Y":24, "Z":25}

for i in range(len(s)):
    temp = li2[s[i]]
    temp += t
    if temp > 25:
        temp -= 26
    
    ans.append(li1[temp])

print("".join(ans))

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

out = ""
for i in S:
    tmp = (ord(i) + N) % 91
    if tmp < 65:
        tmp = tmp + 65
    out = out + chr(tmp)

print(out)

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

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


for i in s:
    a= l.index(i)+n
    if a>=26:
        a-=26
    ans.append(l[a])

print(''.join(ans))

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

Solution (Python):
import numpy as np
N = list(map(int, input().split()))[0]
S = list(map(str, input().split()))[0]


print("".join(list(map(lambda x: chr(x + ord("A")), (np.array(list(map(ord, S))) - ord("A") + N) % 26))))

Solution (Python):

import sys
import math
import numpy as np
import itertools


n = int(input())


s = list(input())


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

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

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

Solution (Python):
import sys

def increment(asc, N):
    new_int = asc + N
    if new_int > ord('Z'):
        new_int = new_int - ord('Z') + ord('A') - 1
    return new_int

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

out = ''
for c in list(S):
    asc = ord(c)
    new_c = chr(increment(asc, N))
    out += new_c

print(out)

Solution (Python):
n=int(input())
s=str(input())  
ans=str()
for j in range(len(s)):
  index=ord(s[j])
    
  index = index + n
  
  if index >= 91:
    index =index - 26
  new_s=chr(index)
  ans += new_s
print(ans)

Solution (Python):
import string
lst = string.ascii_uppercase
N = int(input())
n = 26 - N
S = input()
output = ""
for s in S:
    indx = lst.index(s)
    output += lst[indx - n]

print(output)

Solution (Python):
N = int(input())
S = input()
ans = [] 
for i in range(len(S)):
  if ord(S[i]) + N > 90:
    ans.append(chr(ord(S[i]) + N - 90 + 64))
  else:
  	ans.append(chr(ord(S[i])+N))
ans = ''.join(ans)
print(ans)

Solution (Python):
k = int(input())
n = list(input())
for i in range(len(n)):
    if ord(n[i]) + k > 90:
        n[i] = chr((ord(n[i]) + k)- 90 + 64)
    else:
        n[i] = chr(ord(n[i]) + k)
print("".join(n))

Solution (Python):
keyNum = int(input())
encodingString = str(input()).upper()
translated = ""

for letter in encodingString:
    n = ord(letter)
    n += keyNum

    if n > ord('Z'):
        n -= 26
    elif n < ord('A'):
        n += 26

    translated += chr(n)

print(translated)

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

z = ''
for ss in s:
  for i in range(len(a)):
    if ss == a[i]:
      if i+n > 25:
        j = i+n -26
        z += a[j]
      else:
        z += a[i+n]

print(z)

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

Solution (Python):
n = int(input())
s = input()
answer = ["a"] * len(s)

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

answer=''.join(answer)
print(answer)

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

code = []
for c in S:
    if ord('A') <= ord(c) <= ord('Z'):
        code.append(chr((ord(c) - ord('A') + N) % 26 + ord('A')))

print("".join(code))

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

Solution (Python):
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"]
n = int(input())
s = input()
for i in range(len(s)):
    for j in range(len(l)):
        if j+n > 25 and s[i] ==l[j]:
            s = s[:i] +l[j-26+n]+s[i+1:]
            break
        elif s[i] == l[j]:
            s = s[:i]+l[j+n]+s[i+1:]
            break
            
print(s)

Solution (Python):

def main():
    N = int(input())
    S = input()
    ch = ["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:
        
        ind = ch.index(i)+N
        ans+= ch[ind%26]
    print(ans)


if __name__=="__main__":
    main()

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

Solution (Python):
a=int(input())
s=input()
d=["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","A","B","C","D","E"]
S=list(s)
for i in range(len(S)):
  z=d.index(S[i])
  S[i]=d[z+a]
print("".join(S))

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

for i in range(t):
    if ord(l[i])+n<65+26:
        l[i]=chr(ord(l[i])+n)
    else:
        l[i]=chr(ord(l[i])+n-26)
ans="".join(l)
print(ans)

Solution (Python):

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

def _rot(c, n):
    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 rotn(s, n):
    
    g = (_rot(c, n) for c in s)
    
    return ''.join(g)

print(rotn(s, n))

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

letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

newS = ''
for i, s in enumerate(S):
    letterIdx = (letters.index(s) + n)
    if letterIdx > 26-1:
        letterIdx -= 26
    newS = newS.__add__(letters[letterIdx])

print(newS)

Solution (Python):
n = int(input())
s = input()
s = list(s)
l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(0,len(s)):
  for j in range (0,26):
    if s[i] == l[j]:
      s[i] = l[(j+n)%26]
      break
s = ''.join(s)
print(s)

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

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

str_dict = {}
for i in range(26):
    s = (i + N) % 26 + ord('A')
    str_dict[chr(ord('A') + i)] = chr(s)

new_str = []
for i in S:
    new_str.append(str_dict[i])

s = ''.join(new_str)

print(s)

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

a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
    'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 
    '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)):
    for j in range(len(a)):
        if s[i] == a[j]:
            ans += a[j+n]
            break

print(ans)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def solve():
    n = II()
    s = ord("A")
    ss = S()
    ans = [chr(ord("A") + (ord(i) - ord("A") + n) % 26) for i in ss]
    print("".join(ans))
    return



if __name__ == '__main__':
    solve()

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

ans = ""

for char in list(s):
    ASCII = ord(char)
    num = ASCII - 65 
    num = (num + n) % 26
    ASCII = num + 65 
    ans += chr(ASCII)

print(ans)

Solution (Python):

def main():
    n = int(input())
    s = input()
    ans = []
    a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    for _s in s:
        k = 0
        p = a.find(_s)
        if p + n >= 26:
            k = (p + n) % 26
        else:
            k = p + n
        ans.append(a[k])

    print("".join(ans))


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
s = input()
ans = []
for c in s:
  c_code = (ord(c) + n) % 90
  if(c_code == 0):
    ans.append("Z")
  elif(c_code < 65):
    ans.append(chr(c_code + 64))
  else:
    ans.append(chr(c_code))
print("".join(ans))

Solution (Python):

N = int(input())
S = input()
Snum = [ord(i)-65 for i in S]
chgnum = [(j + N) % 26 + 65 for j in Snum]
chgstr = [chr(k) for k in chgnum]
ans = "".join(chgstr)
print(ans)

Solution (Python):
N = int(input())
S = input()
L = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
A = ''
for i in S:
    A+=L[(L.find(i)+N)%26]
print(A)

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

C = ['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(C)):
        if S[i] == C[j]:
            S[i] = C[(j + N) % 26]
            break

print(''.join(S))

Solution (Python):
n = int(input())
s = str(input())
ans = []
a2z = ["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)):
    index = a2z.index(s[i]) + n
    if index <= 25:
        tmp = a2z[index]
        ans.append(tmp)
    else:
        index -= 26
        tmp = a2z[index]
        ans.append(tmp)

print("".join(ans))

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	n = int(input())
	s = input()[:-1]
	ans = ''
	for i in s:
		p = ord(i) +  n
		ans += chr(p if p < 91 else p-26)
	print(ans)

def factorization(n):
	if n<2:
		return []

	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

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

N = 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="")

Solution (Python):
def is_upper(c):
    return ord('A') <= ord(c) and ord(c) <= ord('Z')


def is_lower(c):
    return ord('a') <= ord(c) and ord(c) <= ord('z')


def shift(c, k):
    if is_upper(c):
        return chr((ord(c) - ord('A') + k) % 26 + ord('A'))
    elif is_lower(c):
        return chr((ord(c) - ord('a') + k) % 26 + ord('a'))
    else:
        return c


def caesar(s, k, decode=False):
    if decode:
        k = -k
    return "".join([shift(c, k) for c in s])


N = int(input())
S = str(input())
enc = caesar(S, N)
print(enc)

Solution (Python):
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", "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)):
    al = alphabet.index(S[i])
    result.append(alphabet[al+N])

print("".join(result))

Solution (Python):
N = int(input())
S = input()
SS = [chr(i) for i in range(65,65+26)]+[chr(i) for i in range(65,65+26)]
ss = [chr(i) for i in range(97,97+26)] +[chr(i) for i in range(97,97+26)]
ans = ""
for s in S:
    if s.islower():
        ans += ss[ord(s)-97+N]
    else:
        ans += SS[ord(s)-65+N]
print(ans)

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

rot = [] * 10 ** 14
for i in range(len(s)):
    rot.append(chr((ord(s[i]) - ord('A') + n) % 26 + ord('A')))
    print(rot[i], end = "")

Solution (Python):
import numpy as np

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

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

S_list = np.array([alpha2num(s) for s in S])


S_list_added = (S_list-1+N)%26+1


S_list_converted = [num2alpha(s) for s in S_list_added]
print("".join(S_list_converted))

Solution (Python):

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


plain = ""

for char in S:
    ASCII = ord(char)
    num = ASCII
    num = num + N
    num = num - 26 if num >= 91 else num
    plain += chr(num)

print(plain)

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

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

def rot(S,N):
    g = (_rot(c,N) for c in S)
    return ''.join(g)

print(rot(S,N))

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

char_list = list(n)
length = len(char_list)
result = []
if s != '0':
    for i in range(0,length):
        x = ord(char_list[i]) + int(s)
        if x > 90:
            x = x - 26
        result.append(chr(x))
        
elif s == '0':
    result = char_list
resultstr = ''.join(result)
print(resultstr)

Solution (Python):
n = int(input())
s = list(input())
alphabet_list = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
alphabet_indexes = []
for s_index in range(len(s)):
    for alphabet_index in range(len(alphabet_list)):
        if s[s_index] == alphabet_list[alphabet_index]:
            s_alphabet_index = (alphabet_index + n)%26
    alphabet_indexes.append(s_alphabet_index)
alphabets = []
for alphabet_index in alphabet_indexes:
    alphabets.append(alphabet_list[alphabet_index])

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

Solution (Python):
n = int(input())
s = input()
c = [ord(x) for x in s]
d = [x + n for x in c]
e = [x % 26 for x in d]

keys = [13,14,15,16,17,18,19,20,21,22,23,24,25,0,1,2,3,4,5,6,7,8,9,10,11,12]
values = ['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']
d = {k: v for k, v in zip(keys, values)}

ans = []
for x in e:
    ans.append(d[x])

print(''.join(ans))

Solution (Python):
n= int(input())
b=list(map(str,input()))
for i in range(0,len(b),1):
    b[i]=ord(b[i])+n
    if b[i]>90 :
        b[i]-=26
    print(chr(b[i]),end="")

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

alphabet = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
ans = []

for i in range(len(S)):
  num = alphabet.index(S[i])+N
  if num > 25:
    num -= 26
  ans.append(alphabet[num])
  
ans = ''.join(ans)
print(ans)

Solution (Python):
N = int(input())
S = input()
length = len(S)
S0 = ''
abc_list = ['A','B','C','D','E','F','G','H','I','J','K','L','M',
            'N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(length):
    for j in range(26):
        if S[i] == abc_list[j]:
            if j+N<=25:
                S0 += abc_list[j+N]
            else:
                k = j+N-26
                S0 += abc_list[k]
            break
print(S0)

Solution (Python):
import sys
input = sys.stdin.readline

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

for i in range(len(s)-1):
  res = chr(ord(s[i])+n)
  if ord(res) > ord("Z"):
    res = chr(ord(res)-ord("Z")+ord("A")-1)
  print(res,end="")

print("")

Solution (Python):
n = int(input())
s = list(input())
s_ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = s
for i in range(len(s)):
    fd = s_.find(s[i]) + n
    if fd >= 26:
        fd -= 26
    ans[i] = s_[fd]
print(''.join(ans))

Solution (Python):
def encrypt(text,s):
  result = ""
  for i in range(len(text)):
    char = text[i]
    if (char.isupper()):
        result += chr((ord(char) + s-65) % 26 + 65)
  return result
n = int(input())
s = str(input())
print(encrypt(s, n))

Solution (Python):
import string
alpha = list(string.ascii_uppercase)
N = int(input())
S = input()
ans = ""
for i in range(len(S)):
    index = alpha.index(S[i])
    num =(index + N) % 26
    ans += str(alpha[num])
print(ans)

Solution (Python):
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"


def map_abc(N, S):
    result = ""
    for str_a in S:
        new_index = (abc.find(str_a) + N) % 26
        new_str = abc[new_index]
        result = result + new_str
    return result


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

Solution (Python):
n = int(input())
s = input()
arr = "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".upper().split()
arr = arr[:] + arr[:] + ["A"]

sol = []
for t in s:
    for i in range(26):
        if t == arr[i]:
            sol.append(arr[i+n])
            break
        
print("".join(sol))

Solution (Python):
N = int(input())
S = str(input())
 
alpha = lambda c:ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)

answer = ''
for i in S:
  num = alpha(i) + N
  if num >= 27:
    num -= 26
  answer += num2alpha(num)

print(answer)

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

ref = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

result = []
for s in S:
    tmp = (ref.index(s) + N) % 26
    result.append(ref[tmp])

print(''.join(result))

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

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

Solution (Python):



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

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

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

Solution (Python):
key = int(input())
plain = str(input())
enc=""

for char in list(plain):
    asci = ord(char)
    num = asci - 65
    num = (num + key) % 26
    asci = num + 65
    enc += chr(asci)

print(enc)

Solution (Python):
n = int(input())
s = input()
alphabets = ['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)):
  for j in range(26):
    if s[i] == alphabets[j]:
      out += alphabets[(j+n)%26]
      break

print(out)

Solution (Python):
n=int(input())
a={0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T",20:"U",21:"V",22:"W",23:"X",24:"Y",25:"Z"}
s=input()
def inverse_lookup(a, x):
    for k,v in a.items():
        if x == v:
            return k
for x,i in enumerate(s):
    ind=inverse_lookup(a,i)
    ind+=n
    if ind>=26:
        ind-=26
    print(a[ind],end="")

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

for i in range(len(s)):
  t = ord(s[i])
  a = t+n
  if a >= 91:
    a = a-26
  l.append(a)
m =[]
for j in range(len(l)):
  b = chr(l[j])
  m.append(b)
print(''.join(m))

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

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

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

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

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


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

new_string = []
for c in S:
  idx = alph.index(c) + N
  if idx >= 26:
    idx -= 26
  new_string.append(alph[idx])

print("".join(new_string))

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

num_to_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",
}


alphabet_to_num = {
  "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",
}
answer = ""
for s in S:
    if int(alphabet_to_num[s])+N <= 26:
        answer += num_to_alphabet[str(int(alphabet_to_num[s])+N)]
    else:
        answer += num_to_alphabet[str(int(alphabet_to_num[s]) + N - 26)]

print(answer)

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

for i in range(len(s)):
    a = ord(s[i]) + n
    if a > 90:
        a = a - 26
    b = chr(a)
    ans += b
    
print(ans)

Solution (Python):
n=int(input())
s=input()
t=''
for letter in s:
  a=chr((ord(letter)+n-65)%26+65)
  t+=a
print(t)

Solution (Python):
n = int(input())
ss = input()
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2
print("".join([alphabet[alphabet.index(s) + n] for s in ss]))

Solution (Python):
i = int(input())
s = input()
l = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
r = ''
for k in s:
    cd = l.index(k) + i
    if cd > 25:
        cd -= 26

    r += l[cd:cd + 1]
print(r)

Solution (Python):
from string import ascii_uppercase as ups
n = int(input())
S = input()
print(''.join(ups[ups.index(ch) + n - 26] for ch in S))

Solution (Python):
n = int(input())
s = list(input())
l = len(s)
ans = []
answer = ""

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

for i in range(l):
    a = s.pop(0)
    b = int(alist.index(a))
    c = b + n
    d = alist[c]
    ans.append(d)
    
for x in ans:
    answer += x

print(answer)

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

a_ascii = ord("A")
z_ascii = ord("Z")
range_ascii = z_ascii - a_ascii + 1
s = list(map(lambda x: ord(x) - a_ascii, list(input())))
s = list(map(lambda x: x + n, s))

for i in range(len(s)):
    if (s[i] - range_ascii) >= 0:
        s[i] = abs(s[i] - range_ascii)

s = list(map(lambda x: chr(x + a_ascii), s))

print("".join(s))

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

alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
result = []

for char in S:
  idx = alphabets.index(char)
  idx += N
  if idx < len(alphabets):
    result.append(alphabets[idx])
  else:
    result.append(alphabets[idx - len(alphabets)])

print(''.join(result))

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

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

for i in S:
    j = ord(i)-ord("A")
    if j + N >= 26:
        j -= 26
    A.append(L[j+N])

print(''.join(A))

Solution (Python):
dict = {
    'A':1,
    'B':2,
    'C':3,
    'D':4,
    'E':5,
    'F':6,
    'G':7,
    'H':8,
    'I':9,
    'J':10,
    'K':11,
    'L':12,
    'M':13,
    'N':14,
    'O':15,
    'P':16,
    'Q':17,
    'R':18,
    'S':19,
    'T':20,
    'U':21,
    'V':22,
    'W':23,
    'X':24,
    'Y':25,
    'Z':26
}
alphlist = ['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']
step = int(input())
a = input()
b = list(a)
d = []
for i in b:
    c = (dict.get(i) + step - 1)%26
    d.append(alphlist[c])
print(''.join(d))

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

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

for char in s:
    after = ord(char) + n
    if after > 90:
        after -= 26
    ans += chr(after)

print(ans)

Solution (Python):
N=int(input())
S=str(input())
s=list(S)
t=['']*len(s)


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

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

def char2ascii(char):
    return ord(char)
    
def ascii_ope(ascii, num):
    pre_ascii = ascii + num
    if pre_ascii > 90:
        pre_ascii = pre_ascii - 26
    return pre_ascii

pre_str=''
for char in S:
    ascii = char2ascii(char)
    pre_ascii = ascii_ope(ascii, N)
    
    pre_char = chr(pre_ascii)
    pre_str += pre_char
    

print(pre_str)

Solution (Python):
n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def hen(c):
    for i in range(26):
        if c == al[i]:
            return al[(i+n) % 26]
print("".join([hen(c) for c in s]))