Harryxun/stf_run huggingface dataset:
import numpy as np
s = input()
temp = s
temp = temp.replace("x","")
is_rev = True

mirro = []
for i in range(len(temp)//2):
    if temp[i] == temp[-i-1]:
        mirro.append(temp[i])
        continue
    else:
        is_rev = False
if len(temp) %2 == 1:
    mirro.append(temp[len(temp)//2])

if is_rev:
    ind = 0
    i = 0
    lx = np.array([0 for i in range(len(temp)//2+len(temp)%2)])
    rx = np.array([0 for i in range(len(temp)//2+len(temp)%2)])
    temp = 0
    while (True):
        if s[i] == mirro[ind]:
            lx[ind] = temp
            temp = 0
            ind += 1
            i += 1
        else:
            temp += 1
            i += 1

        if ind > len(mirro)-1:
            break
    ind = 0
    i = -1
    temp = 0
    while (True):
        if s[i] == mirro[ind]:
            rx[ind] = temp
            temp = 0
            ind += 1
            i -= 1
        else:
            temp += 1
            i -= 1

        if ind > len(mirro)-1:
            break
    # print(lx)
    # print(rx)
    print(np.sum(np.abs(lx-rx)))
else:
    print(-1)

### FIXED CODE ###

import numpy as np
s = input()
temp = s
temp = temp.replace("x","")
is_rev = True

mirro = []

if len(temp) == 0:
    print(0)
else:
    for i in range(len(temp)//2):
        if temp[i] == temp[-i-1]:
            mirro.append(temp[i])
            continue
        else:
            is_rev = False
    if len(temp) %2 == 1:
        mirro.append(temp[len(temp)//2])

    if is_rev:
        ind = 0
        i = 0
        lx = np.array([0 for i in range(len(temp)//2+len(temp)%2)])
        rx = np.array([0 for i in range(len(temp)//2+len(temp)%2)])
        temp = 0
        while (True):
            if s[i] == mirro[ind]:
                lx[ind] = temp
                temp = 0
                ind += 1
                i += 1
            else:
                temp += 1
                i += 1

            if ind > len(mirro)-1:
                break
        ind = 0
        i = -1
        temp = 0
        while (True):
            if s[i] == mirro[ind]:
                rx[ind] = temp
                temp = 0
                ind += 1
                i -= 1
            else:
                temp += 1
                i -= 1

            if ind > len(mirro)-1:
                break
        # print(lx)
        # print(rx)
        print(np.sum(np.abs(lx-rx)))
    else:
        print(-1)
A, B, K = map(int, input().split())
if B - A < 2 * K:
    ans = [*range(A, B + 1)]
else:
    ans = [*range(A, A + K), *range(B - K + 1, B + 1)]
for v in ans:
    print(v)


### FIXED CODE ###

A, B, K = map(int, input().split())
if B - A < 2 * K:
    # ans = [*range(A, B + 1)]
    ans = list(range(A, B + 1))
else:
    # ans = [*range(A, A + K), *range(B - K + 1, B + 1)]
    ans = list(range(A, A + K)) + list(range(B - K + 1, B + 1))
for v in ans:
    print(v)
# An efficient Python3 program to compute
# sum of bitwise OR of all pair

# Returns sum of bitwise OR
# of all pairs
def sumXOR( arr,  n):

    sum = 0
    for i in range(0, 61):

        #  Count of zeros and ones
        zc = 0
        oc = 0

        # Individual sum at each bit position
        idsum = 0
        for j in range(0, n):
            if (arr[j] % 2 == 0):
                zc = zc + 1

            else:
                oc = oc + 1
            arr[j] = int(arr[j] / 2)


        # calculating individual bit sum
        idsum = oc * zc * (1 << i)

        # final sum
        sum = sum + idsum;

    return sum%(1e9+7)



# driver function
sum = 0
n = int(input())
arr = []
for _ in range(n):
    arr.append(int(input())
sum = sumXOR(arr, n);
print (sum)


### FIXED CODE ###

import numpy as np

MAX_DIGIT = 60
MOD = 10**9 + 7

N = int(input())
A = np.array([int(a) for a in input().split()])

answer = 0
for d in range(MAX_DIGIT + 1):
    A, r = (A>>1), A % 2
    s = int(r.sum())
    base = (1<<d) % MOD #this may be key
    answer += (base * s * (N - s)) % MOD

answer %= MOD
print(answer)
if a < b:
  print('a < b')
if a > b:
  print('a > b')
if a == b:
  print('a == b')
else:
  pass

### FIXED CODE ###

a, b = map(int, input().split())
if a < b:
  print('a < b')
elif a > b:
  print('a > b')
elif a == b:
  print('a == b')
else:
  pass
from scipy.misc import comb


def main2():
    input()
    t = sorted(list(map(int, input().split())))
    combs = {}
    c = comb(t[-1], t[len(t)//2], exact=True)
    c2 = comb(t[-1], t[len(t)//2 + 1], exact=True)
    if c < c2:
        print(t[-1], t[len(t) // 2 + 1])
    else:
        print(t[-1], t[len(t) // 2])



if __name__ == '__main__':
    main2()

### FIXED CODE ###

def main3():
    input()
    t = sorted(list(map(int, input().split())))
    ma = t.pop(-1)
    r = min(t, key=lambda x: abs(x - ma / 2))
    print(ma, r)

if __name__ == '__main__':
    main3()
b=input()
if b='A':print('T')
if b='T':print('A')
if b='C':print('G')
if b='G':print('C')

### FIXED CODE ###

b=input()
if b=='A':print('T')
if b=='T':print('A')
if b=='C':print('G')
if b=='G':print('C')
n = str(input())
if n == 1:
    print(1)
    exit()
if n[0] == "1":
    tmpint = eval("9"*(len(n)-1))
    #print("tmpint",tmpint)
else:
    tmpint = eval(str(eval(n[0])-1) + "9"*(len(n)-1))
    #print("tmpint",tmpint)
tmpsum = sum([
        eval(str(tmpint)[i]) for i in range(len(str(tmpint)))
    ])
ssum = sum([
        eval(n[i]) for i in range(len(str(n)))
    ])
print(max(tmpsum,ssum))
#print(tmpsum,ssum)

### FIXED CODE ###

n = str(input())
if n == "1":
    print(1)
    exit()
if n[0] == "1":
    tmpint = eval("9"*(len(n)-1))
    #print("tmpint",tmpint)
else:
    tmpint = eval(str(eval(n[0])-1) + "9"*(len(n)-1))
    #print("tmpint",tmpint)
tmpsum = sum([
        eval(str(tmpint)[i]) for i in range(len(str(tmpint)))
    ])
ssum = sum([
        eval(n[i]) for i in range(len(str(n)))
    ])
print(max(tmpsum,ssum))
#print(tmpsum,ssum)
L=list(map(int, input().split()))
X=sorted([abs(L[3]-L[1]),abs(L[1]-L[2]),abs(L[2]-L[3])])
print(X[0]+X[1])

### FIXED CODE ###

L=list(map(int, input().split()))
X=sorted([abs(L[2]-L[0]),abs(L[0]-L[1]),abs(L[1]-L[2])])
print(X[0]+X[1])
N = int(input())
S, T = map(int,input().split())
for i in N:
    print(S + T)


### FIXED CODE ###

N = int(input())
S, T = map(str,input().split())
for i in range(N):
     print(S[i] + T[i],end="")
from collections import Counter
from pandas import Series, DataFrame
 
N,K=map(int,input().split())
A=list(map(int,input().split()))
count=0
S=set(A)
c=Counter(A)
L=c.most_common(len(S))
 
x=len(S)-1
for _ in range(len(S)-K):
    count=count+int(L[x][1])
    x=x-1
 
print(count)

### FIXED CODE ###

from collections import Counter


N,K=map(int,input().split())
A=list(map(int,input().split()))
count=0
S=set(A)
c=Counter(A)
L=c.most_common(len(S))

x=len(S)-1
for _ in range(len(S)-K):
    count=count+int(L[x][1])
    x=x-1

print(count)
import heapq

max_v,m = input().split()
max_v = int(max_v)
m = int(m)

class Edge(object):
	def __init__(self, to, cost):
		self.to = to
		self.cost = cost


edges = [[] for j in range(max_v)]
for i in range(max_v):
  a, b = input().split()
  a = int(a)
  b = int(b)
  edges[a-1].append(Edge(b-1,1))
  edges[b-1].append(Edge(a-1,1))

d = [float("inf")]*max_v
fire = [-1]*max_v
#fire = [[[]for j in range(max_v)] for i in range(max_v)]
def dijkstra(s):
	h = []
	d[s] = 0
	heapq.heappush(h, [0,0])
	while(len(h) != 0):
		p = heapq.heappop(h)
		v = p[1]
		if d[v] < p[0]:continue
		for i in range(len(edges[v])):
			e = edges[v][i]
			if d[e.to] > d[v] + e.cost:
				d[e.to] = d[v] + e.cost
				heapq.heappush(h, [d[e.to], e.to])
				fire[e.to] = v
dijkstra(0)
if 2 <= fire.count(-1):
  print("No")
else:
  print("Yes")
  for i in range(1, max_v):
    print(fire[i]+1)

### FIXED CODE ###

import heapq

max_v,m = input().split()
max_v = int(max_v)
m = int(m)

class Edge(object):
	def __init__(self, to, cost):
		self.to = to
		self.cost = cost


edges = [[] for j in range(max_v)]
for i in range(m):
  a, b = input().split()
  a = int(a)
  b = int(b)
  edges[a-1].append(Edge(b-1,1))
  edges[b-1].append(Edge(a-1,1))

d = [float("inf")]*max_v
fire = [-1]*max_v
#fire = [[[]for j in range(max_v)] for i in range(max_v)]
def dijkstra(s):
	h = []
	d[s] = 0
	heapq.heappush(h, [0,0])
	while(len(h) != 0):
		p = heapq.heappop(h)
		v = p[1]
		if d[v] < p[0]:continue
		for i in range(len(edges[v])):
			e = edges[v][i]
			if d[e.to] > d[v] + e.cost:
				d[e.to] = d[v] + e.cost
				heapq.heappush(h, [d[e.to], e.to])
				fire[e.to] = v
dijkstra(0)
if 2 <= fire.count(-1):
  print("No")
else:
  print("Yes")
  for i in range(1, max_v):
    print(fire[i]+1)
cnt = 0
for a in range(1, n):
    cnt +=(n -1)// a
print(cnt)

### FIXED CODE ###

n = int(input())

cnt = 0
for a in range(1, n):
    cnt +=(n -1)// a
print(cnt)
l=[]
for mark in ["S","H","C","D"]:
	for i in range(1,14):
		l.append(mark+" "+str(i))
n=input()
for i in range(n):
	l.remove(input())
for i in l:
	print(i)

### FIXED CODE ###

l=[]
for mark in ["S","H","C","D"]:
	for i in range(1,14):
		l.append(mark+" "+str(i))
n=input()
for i in range(int(n)):
	l.remove(input())
for i in l:
	print(i)
A,B=map(input().split())
print((A-1)*(B-1))

### FIXED CODE ###

A,B=map(int,input().split())
print((A-1)*(B-1))
l=[]
while True:
    s = raw_input()
    if s=="":
        break
    l.append(s)
l.sort()
l.reverse()
for i in range(3):
    print l.pop(0)

### FIXED CODE ###

l=[]
while True:
    try:
        l.append(input())
    except EOFError:
        break
l.sort(reverse = True)
for i in range(3):
    print l[i]
in = input()

result = 999

for i in range(len(in)-2):
  if i == len(in) - 3:
    num = in[i:]
  else:
    num = in[i:i+3]

  sa = abs(753 - int(num))

  if sa < result:
    result = sa

print(result)


### FIXED CODE ###


inn = str(input())

result = 999

for i in range(len(inn)-2):
  if i == len(inn) - 3:
    num = inn[i:]

  else:
    num = inn[i:i+3]

  sa = abs(753 - int(num))

  if sa < result:
    result = sa

print(result)
x = [int(i) for i in input().split()]
pay = sum(x[1:]) - max(x[1:])//2
print(pay)

### FIXED CODE ###

x = int(input())
p = [int(input()) for i in range(x)]
pay = sum(p) - max(p)//2
print(pay)
l = raw_input().split(" ")
num=int(l[0])*100+int(l[1])*10+int(l[2])

if num%4==0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

l = raw_input().split(" ")
num=int(l[0])*100+int(l[1])*10+int(l[2])

if num%4==0:
    print("YES")
else:
    print("NO")
H, W = map(int, input().split())

inpt =[]
for h in H:
    i = str(input())
    inpt.append(i)

string = 'No'

for h in range(H):
    for w in range(W):
        if h == H-1 or w == W-1:
            continue
        if inpt[h][w] == '#':
            if inpt[h+1][w] == '#' or inpt[h][w+1] == '#':
                 string = 'Yes'
                 
print(string)


### FIXED CODE ###

a, b = map(int, input().split())
takahashi = 0
 
for x in range(1, a):
    for y in range(1, 31):
        if x == y:
            takahashi += 1
 
for x in range(1, b+1):
    if x == a:
        takahashi += 1
print(takahashi)
N = int(input())
A = list(map(int, input().split()))
IND = list(set(A))
CNT = [A.count(x) for x in IND]
# print(IND)
# print(CNT)
CONB = [CNT[x-1]*(CNT[x-1]-1)//2 for x in IND]
# print(CONB)
SUM = sum(CONB)
CALC = [-1]*(N+1)
for i in A:
    if CALC[i] != -1:
        print(CALC[i])
    else:
        # n = CNT[IND.index(i)]
        # ans = SUM - CONB[IND.index(i)] + (n-1)*(n-2)//2
        ans = SUM - CNT[i-1] + 1
        CALC[i] = ans
        print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
CNT = [0]*(N+1)
# IND = list(set(A))
# CNT = [A.count(x) for x in IND]
for i in A:
    CNT[i] += 1
# print(IND)
# print(CNT)
# CONB = [A.count(x)*(A.count(x)-1)//2 for x in IND]
CONB = [CNT[x]*(CNT[x]-1)//2 for x in range(len(CNT))]
# print(CONB)
SUM = sum(CONB)
for i in A:
    ans = SUM - CNT[i] + 1
    print(ans)
import sys


a = int(input())

cur = 0
for i in range(1, 10 ** 7):
	b = sum([(7 * (10**x)) for x in range(i + 1)])
    cur %= b
    if cur == 0:
        print(i)
        sys.exit()
print(-1)

### FIXED CODE ###

import sys


a = int(input())

cur = 0
for i in range(1, 10 ** 7):
	#b = sum([(7 * (10**x)) for x in range(i + 1)])
    cur *= 10
    cur += 7
    cur %= a
    if cur == 0:
        print(i)
        sys.exit()
print(-1)
from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
if n == 1:
    N = 1
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
if m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))


### FIXED CODE ###

from math import factorial
n,m = map(int,input().split())

if n == 0:
   N = 0
elif n == 1:
    N = 0
else:
    N = factorial(n)/factorial(2)/factorial(n-2)
if m == 0:
   M = 0
elif m == 1:
    M = 0
else:
    M = factorial(m)/factorial(2)/factorial(m-2)

print(int(N+M))
a=input()
print(a.replace(',',' ')

### FIXED CODE ###

a=input()
print(a.replace(',',' '))
s = input()
a = [0]
answer = [0 for i in range(len(s)) ]
for i in range(len(s)-1):
    if s[i]!=s[i+1]:
        a.append(i+1)

for i in range(1,len(a),2):
    if i ==len(a)-1:
        a.append(len(s))
    if (a[i+1]-a[i-1])%2==0:
        answer[a[i]-1] = int((a[i+1]-a[i-1])//2)
        answer[a[i]] = int((a[i+1]-a[i-1])//2)
    else:
        if (a[i+1]-a[i])%2==1:
            answer[a[i]-1] = int((a[i+1]-a[i-1])//2)
            answer[a[i]] = int((a[i+1]-a[i-1])//2)+1
        else:
            answer[a[i]-1] = int((a[i+1]-a[i-1])//2)+1
            answer[a[i]] = int((a[i+1]-a[i-1])//2)

for i in range(answer):
    print(answer[i])

### FIXED CODE ###

s = input()
a = [0]
answer = [0 for i in range(len(s)) ]
for i in range(len(s)-1):
    if s[i]!=s[i+1]:
        a.append(i+1)

for i in range(1,len(a),2):
    if i ==len(a)-1:
        a.append(len(s))
    if (a[i+1]-a[i-1])%2==0:
        answer[a[i]-1] = int((a[i+1]-a[i-1])//2)
        answer[a[i]] = int((a[i+1]-a[i-1])//2)
    else:
        if (a[i+1]-a[i])%2==1:
            answer[a[i]-1] = int((a[i+1]-a[i-1])//2)
            answer[a[i]] = int((a[i+1]-a[i-1])//2)+1
        else:
            answer[a[i]-1] = int((a[i+1]-a[i-1])//2)+1
            answer[a[i]] = int((a[i+1]-a[i-1])//2)

for i in range(len(answer)):
    print(answer[i])
import math
import numpy as np
from collections import Counter

N = int(input())

xyz_lim = int(math.sqrt(N-2)) - 1

def f(x, y, z):
    return ((x+y)**2 + (y+z)**2 + (z+x) ** 2) // 2

cnt = Counter()
for _x in range(xyz_lim):
    for _y in range(xyz_lim):
        x, y = _x+1, _y+1
        cnt.update([f(x, y, _z+1) for _z in range(xyz_lim)])

for _n in range(N):
    n = _n + 1
    print(cnt[n])

### FIXED CODE ###

import math
import numpy as np
from collections import Counter

N = int(input())

if N == 1:
    print(0)
else:
    xyz_lim = int(math.sqrt(N-2)) - 1

    def f(x, y, z):
        return ((x+y)**2 + (y+z)**2 + (z+x) ** 2) // 2

    cnt = Counter()
    for _x in range(xyz_lim):
        for _y in range(xyz_lim):
            x, y = _x+1, _y+1
            cnt.update([f(x, y, _z+1) for _z in range(xyz_lim)])

    for _n in range(N):
        n = _n + 1
        print(cnt[n])
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
 
ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
        j -= 1
        ans = max(ans, i + j)
print(ans)


### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
a, b = [0], [0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
 
ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
N = int(input())
g = [[[]for i in range(2)] for j in range(N)]

for i in range(N-1):
    u,v,d = map(int,input().split())
    if d%2 == 0:
        g[u-1][0].append(v-1)
        g[v-1][0].append(u-1)
    else:
        g[u-1][1].append(v-1)
        g[v-1][1].append(u-1)

ans = [-1]*N
ans[0] = 0

stack = [0]
not_visit = [True for i in range(N)]
not_visit[0] = False

while stack:
    now = stack.pop()
    for h in range(2):
        for i in range(len(g[now][h])):
            if not_visit[g[now][h][i]]: #距離が偶数ならば
                not_visit[g[now][0][i]] = False
                ans[g[now][0][i]] = ans[now]
                stack.append(g[now][0][i])
        for i in range(len(g[now][h])):
            if not_visit[g[now][h][i]]: #距離が奇数ならば
                not_visit[g[now][1][i]] = False
                ans[g[now][1][i]] = (ans[now] + 1)%2
                stack.append(g[now][1][i])

for i in range(N):
    print(ans[i])

### FIXED CODE ###

N = int(input())
g = [[[]for i in range(2)] for j in range(N)]

for i in range(N-1):
    u,v,d = map(int,input().split())
    if d%2 == 0:
        g[u-1][0].append(v-1)
        g[v-1][0].append(u-1)
    else:
        g[u-1][1].append(v-1)
        g[v-1][1].append(u-1)

ans = [-1]*N
ans[0] = 0

stack = [0]
not_visit = [True for i in range(N)]
not_visit[0] = False

while stack:
    now = stack.pop()
    for h in range(2):
        if h == 0: #距離が偶数ならば
            for i in range(len(g[now][h])):
                if not_visit[g[now][h][i]]:
                    not_visit[g[now][h][i]] = False
                    ans[g[now][h][i]] = ans[now]
                    stack.append(g[now][h][i])
        if h == 1: #距離が奇数ならば
            for i in range(len(g[now][h])):
                if not_visit[g[now][h][i]]:
                    not_visit[g[now][h][i]] = False
                    ans[g[now][h][i]] = (ans[now] + 1)%2
                    stack.append(g[now][h][i])

for i in range(N):
    print(ans[i])
n, k = map(int, input().split())
A = list(map(int, input().split()))

MOD = 10 ** 9 + 7

AA = sorted(A, key=lambda x: -abs(x))

ans = []
mns = []
pls = []
itr = 0
while itr < k:
  ans.append(AA[itr])
  if AA[itr] < 0:
    mns.append(AA[itr])
  else:
    pls.append(AA[itr])
  itr += 1

mflg = False
pflg = False
zflg = False
if all(a < 0 for a in A) and k % 2 == 1:
  AA = sorted(A, key=lambda x: abs(x))
  mns = []
  for itr in range(k):
    mns.append(AA[itr])

elif len(mns) % 2 != 0:
  mm = mns[-1]
  pp = pls[-1]
  for i in range(itr, n):
    nn = AA[i]
    if nn > 0 and not pflg:
      pp *= nn
      pflg = True
      pv = nn
    elif nn < 0 and not mflg:
      mm *= nn
      mflg = True
      mv = nn
    elif nn == 0:
      zflg = True
  if mflg and not pflg:
    del pls[-1]
    mns.append(mv)
  elif pflg and not mflg:
    del mns[-1]
    pls.append(pv)

a = 1
for m in mns:
  a = (a * m) % MOD
for p in pls:
  a = (a * p) % MOD

print(a)

### FIXED CODE ###

n, k = map(int, input().split())
A = list(map(int, input().split()))

MOD = 10 ** 9 + 7

AA = sorted(A, key=lambda x: -abs(x))

nega1 = []
posi1 = []
for a in AA[:k]:
  if a < 0:
    nega1.append(a)
  else:
    posi1.append(a)

nega2 = []
posi2 = []
for a in AA[k:]:
  if a < 0:
    nega2.append(a)
  else:
    posi2.append(a)

if all(a < 0 for a in A) and k % 2 == 1:
  AA = sorted(A, key=lambda x: abs(x))
  nega1 = []
  posi1 = []
  for a in AA[:k]:
    nega1.append(a)

elif n == k:
  pass

elif len(nega1) % 2 != 0:
  if posi1 and nega2 and posi2:
    if abs(nega1[-1] * nega2[0]) < abs(posi1[-1] * posi2[0]):
      del nega1[-1]
      nega1.append(posi2[0])
    else:
      del posi1[-1]
      posi1.append(nega2[0])
  elif not posi1 or not nega2:
    del nega1[-1]
    nega1.append(posi2[0])
  elif not posi2:
    del posi1[-1]
    posi1.append(nega2[0])
  
a = 1
for m in posi1:
  a = (a * m) % MOD
for p in nega1:
  a = (a * p) % MOD
 
print(a)
#!/usr/bin/env python3 ## -*- python -*-
import math

t = input().split()
a = int(t[0])
b = int(t[1])
c = int(t[2])

ans = "No"
if math.sqrt(a)+math.sqrt(b) < math.squrt(c):
    ans = "Yes"
print(ans)

### FIXED CODE ###

#!/usr/bin/env python3 ## -*- python -*-

t = input().split()
a = int(t[0])
b = int(t[1])
c = int(t[2])

ans = "No"
z = c-a-b
if z > 0 and 4 * a * b < z*z:
    ans = "Yes"
print(ans)
def hmtd(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    and += 1
  return ans

n = int(input())
a = map(int, input().split())
ans = min(map(hmtd, a))

print(ans)

### FIXED CODE ###

import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
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)]


# A
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


# B
def B():
    al = list("ABCDEFGHIJKLMNOIQRSTUVWXYZ")
    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


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()


### FIXED CODE ###

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


# A
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


# B
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


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()
n,k=map(int,input().split())
a=tuple(map(int,input().split()))
l=[0]
for i in range(1,n):
  b=a[i]
  l+=[min(l[-j]+abs(b-a[-j])for j in range(1,min(i,k)+1))]
  if i>=k:
    a.del(0)
    l.del(0)
print(l[-1])


### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
l=[0]
for i in range(1,n):
  b=a[i]
  l.append(min(l[j]+abs(b-a[j])for j in range(i-min(k,i),i)))
print(l[-1])
from fractions import gcd
n=int(input())
num=list(map(int,input().split()))
for i in range(len(num-1)):
  if i==0:
    ans=gcd(num[0],num[1])
  else:
    ans=gcd(ans,num[i+1])
print(ans)

### FIXED CODE ###

from fractions import gcd
n=int(input())
num=list(map(int,input().split()))
for i in range(len(num)-1):
  if i==0:
    ans=gcd(num[0],num[1])
  else:
    ans=gcd(ans,num[i+1])
print(ans)
while(true)
	a = input()
	if a==EOF:
		break
	b = input()
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)


### FIXED CODE ###

import sys
for line in sys.stdin:
	l=0
	for l in range(len(line)):
		if(line[l] == ' '):
			p = l
			break
	a = line[0:p]
	b = line[p+1:]
	c = int(a)+int(b)
	d = 1
	while(int(c/10) != 0):
		d += 1
		c = int(c/10)
	print(d)