Harryxun/stf_run huggingface dataset:
X = int(input())

lst = [ [400, 599, 8], [600, 799, 7], [800, 999, 6], [1000, 1199, 5], [1200, 1399, 4], [1400, 1599, 3], [1600, 1799, 2], [1800, 1999, 1] ]

def Kyu(X):
   
   for i in lst:
      if i[0] <= X <= i[1]:
         result = i[2]
         break
   
print(result)

### FIXED CODE ###

X = int(input())

lst = [ [400, 599, 8], [600, 799, 7], [800, 999, 6], [1000, 1199, 5], [1200, 1399, 4], [1400, 1599, 3], [1600, 1799, 2], [1800, 1999, 1] ]

def Kyu(X):
   
   for i in lst:
      if i[0] <= X <= i[1]:
         result = i[2]
         break
   print(result)

Kyu(X)
x,a,b=map(int, input().split())

print((x-a)%b)

### FIXED CODE ###

x, a, b=[int(input()) for i in range(3)]
print((x-a)%b)
s = 0
for i in range(2):
    if A > B:
        s += A
        A -= 1
    else:
        s += B
        B -= 1
print(s)

### FIXED CODE ###

x= [ int(x) for x in input().split()]

a,b=x[0],x[1]

y = (max(a,b))

resultado1 = (y*2)-1
resultado2 = a+b

print(max(resultado1,resultado2))
n,a,b=map(int,input().split())
ans=0
def digitsum(n):
  l=len(str(n))
  re=0
  for i in range(l):
    re+=int(str(n[i]))
  return re
for i in range(n):
  if a<=digitsum(i)<=b:
    ans+=i
print(i)

### FIXED CODE ###

n,a,b=map(int,input().split())
ans=0
def digitsum(n):
  l=len(str(n))
  re=0
  for i in range(l):
    re+=int(str(n)[i])
  return re
for i in range(n+1):
  if a<=digitsum(i)<=b:
    ans+=i
print(ans)
r = int(input())
pi = 3.141592653589
print("{0:0.8f} {1:0.8f}".format(r**2*pi,r*2*pi))

### FIXED CODE ###

import math
r = float(input())
print("{0:.6f} {1:.6f}".format(r**2*math.pi,r*2*math.pi))
def solve():
	while 1:
		n = int(input())
		if n==0:
			break
		score_a=0
		score_b=0
		while n>0:
			(a,b)=map(int, input().split())
			if a>b:
				score_a = score_a + a + b
			elif a<b:
				score_b = score_b + a + b
			else:
				score_a = score_a + a
				score_b = score_b + b
			n = n-1
		print(score_a, score_b)

if __name__ == '__main__':
	solve()

### FIXED CODE ###

def solve():
	import sys
	while 1:
		n = int(raw_input())
		if n==0:
			break
		score_a=0
		score_b=0
		while n>0:
			(a,b)=map(int, raw_input().split())
			if a>b:
				score_a = score_a + a + b
			elif a<b:
				score_b = score_b + a + b
			else:
				score_a = score_a + a
				score_b = score_b + b
			n = n-1
		print score_a, score_b

if __name__ == '__main__':
	solve()
N = int(input())
S = list(input())

if S == ['#'] * N or S == ['.'] * N:
    print(0)
    exit()
ans = 0
b, w = 0, 0
for j in range(N):
    if S[j] == '.':
        w += 1
    else:
        b += 1
    if b == w and b != 0 and w != 0:
        ans += b
        num = j
        b, w = 0, 0

b, w = 0, 0
for j in range(N - 1, num + 1, -1):
    if S[j] == '.':
        w += 1
    else:
        b += 1
    if b == w and b != 0 and w != 0:
        ans += b
        b, w = 0, 0

print(ans)

### FIXED CODE ###

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

w_cnt = [0]
w = 0
for s in S:
    if s == '.':
        w += 1
    w_cnt.append(w)

b_cnt = [0]
b = 0
for s in S[::-1]:
    if s == '#':
        b += 1
    b_cnt.append(b)
b_cnt.reverse()


ans = float('inf')
i = 0
for b, w in zip(b_cnt, w_cnt):
    ww, bb = i, N - i
    ans = min(ans, abs(b - bb) + abs(w - ww))
    i += 1
print(ans)
import sys
input = lambda: sys.stdin.readline()[:-1]
from collections import Counter
from collections import defaultdict
s =input()
lenth=len(s)
ss=s*2
t =input()
place=defaultdict(list)
guide=Counter()
flag=0
for k,l in enumerate(s):
	for word in range(97, 97+26):
		word=chr(word)
		if word==l:
			place[word].append(k)
			place[word].append(k+lenth)
			flag=1

now=0
ans=0
for i in t:
	if not place[i]:
		print(-1)
		exit()
	mt=min((j for j in place[i] if j>now))
	if mt>lenth:
		mt-=lenth
		ans+=lenth
	now=mt
print(ans+now+1)



			

	





	

### FIXED CODE ###

import sys
from bisect import bisect_right
input = lambda: sys.stdin.readline()[:-1]
from collections import defaultdict
s =input()
lenth=len(s)
ss=s*2
t =input()
place=defaultdict(list)

for k,l in enumerate(s):
	place[l].append(k+1)
	place[l].append(k+1+lenth)
for i in place.values():
	i.sort()
now=0
ans=0

for i in t:
	if not place[i]:
		print(-1)
		exit()
	mt=place[i][bisect_right(place[i],now)]
	if mt>lenth:
		mt-=lenth
		ans+=lenth
	now=mt
print(ans+now)
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)

N, Q = map(int, input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]

# 木構造をリストで表現する
graph = [[] for _ in range(N+1)]

for a, b in AB:
    graph[a].append(b)
    graph[b].append(a)

# 各操作で与えられる値を、各頂点ごとに集計しておく
value = [0] * (N+1)
for p, x in PX:
    value[p] += x


def dfs(v, parent, point):
    # 現在いる頂点vの親までの値をpointとする
    value[v] += point
    for x in graph[v]:
        if x == parent:
            continue
        dfs(x, v, value[v])


dfs(1, 0, 0)

res = ' '.join(map(str, P[1:]))
print(res)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

 
N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
 
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
 
value = [0] * (N+1)
for p,x in PX:
    value[p] += x
 
def dfs(v,parent,add):
    value[v] += add
    for x in graph[v]:
        if x == parent:
            continue
        dfs(x,v,value[v])
 
dfs(1,0,0)
 
answer = ' '.join(map(str,value[1:]))
print(answer)
import heapq
N = input()
V = input().split()

heapq.heapfy(V)
for i in range(N-2):
  heapq.heappush((heapq.heappop(V)+heapq.heappop(V))/2)
print(sum(V)/2)
  

### FIXED CODE ###

import heapq
N = int(input())
V = list(map(int, input().split()))
 
heapq.heapify(V)
for i in range(N-2):
  heapq.heappush(V, (heapq.heappop(V)+heapq.heappop(V))/2)
print(sum(V)/2)
a,b,c = input().split()
 
score = 1
if a != b:
	score = score + 1
elif b !=c:
	score = score + 1
elif c !=a:
else:
	score = score
print(score)

### FIXED CODE ###

a,b,c = input().split()

if a == b and a == c:
	print(1)
elif a ==b and a != c:
	print(2)
elif b == c and b != a:
	print(2)
elif c ==a and c != b:
	print(2)
elif a != b and b != c and c != a:
	print(3)
N = int(input())
count = 0
for i in range(N+1):
  if i % 3 != 0 and i % 5 != 0:
  print(i)
print(count)

### FIXED CODE ###

N = input()
flag = 0
for i in range(len(N)):
  if int(N[i]) == 7:
    flag = 1
if flag == 1:
  print('Yes')
else:
  print('No')
n, a =map(int, input().split())
x=list(map(int, input().split()))
x=[i-a for i in x]
memo=[[-1]*110 for i in range(60)]
def dp(k, value):
    if k==n:
        if value==0:
            return 1
        else:
            return 0
    if memo[k][value]>0:
        return memo[k][value]
    memo[k][value]=dp(k+1, value+x[k])+dp(k+1, value)
    return memo[k][value]
print(dp(0, 0)-1)

### FIXED CODE ###

n, a = map(int, input().split())
x=list(map(lambda x: int(x)-a, input().split()))
k=[[0]*3000 for i in range(60)]
for i in range(3000):
    k[0][i]=0
k[0][x[0]+1500]+=1
k[0][1500]+=1
for i in range(1, n):
    for j in range(3000):
        if 3000>j-x[i]>=0:
            k[i][j]=k[i-1][j-x[i]]+k[i-1][j]
        else:
            k[i][j]=k[i-1][j]
print(k[n-1][1500]-1)
K, X = list(map(lambda n: int(n), input().split(" ")))
print(" ".join(list(range(K - X + 1, K + X - 1))))

### FIXED CODE ###

K, X = list(map(lambda n: int(n), input().split(" ")))
print(" ".join(list(map(lambda s: str(s), list(range(X - K + 1, X + K))))))
import numpy as np

N = int(input())
an = [int(x) for x in list(input())]

arr = np.array(an)

for i in range(N-1,0,-1):
    arr2 = abs(arr[0:-1] - arr[1:])
    arr = arr2

print(arr[0])

### FIXED CODE ###

def update(i,j):

    tmp_A = 200
    tmp_B = 200
    
    if 0 < i < H and j < W:
        if table[i-1][j] == table[i][j]:
            tmp_A = colormap[i-1][j]
        else:
            if table[i-1][j]:
                tmp_A = colormap[i-1][j] + 1
            else:
                tmp_A = colormap[i-1][j]
    if i < H and 0 < j < W:
        if table[i][j-1] == table[i][j]:
            tmp_B = colormap[i][j-1]
        else:
            if table[i][j-1]:
                tmp_B = colormap[i][j-1] + 1
            else:
                tmp_B = colormap[i][j-1]
    
    colormap[i][j] = min(tmp_A, tmp_B)

H, W = map(int, input().split())
table = []
for i in range(H):
    table.append([(True if x == "." else False) for x in list(input())])

colormap = [[0 for _ in range(W)] for _ in range(H)]
colormap[0][0] = 0 if table[0][0] else 1

for i in range(H):
    for j in range(W):
        if not(i == 0 and j ==0):
            update(i, j)
    # print(colormap)

# 必要反転回数
print(colormap[H-1][W-1])
k,x = map(int,input().spleit())

if x =< k*500:
    print('Yes')

else:
    print('No')

### FIXED CODE ###

k,x = map(int,input().split())

if  500*k >= x:
  print('Yes')
else:
  print('No')
import numpy as np

D=int(input())
C=np.array(list(map(int,input().split())))
minus_list=C.copy()
S=[]
S_sa=[]
sa=[]
for i in range(D):
    minlis=minus_list.tolist()
    print(minlis.index(max(minlis)+1))
    minus_list[minlis.index(max(minlis))]=0
    minus_list+=C

### FIXED CODE ###


D=int(input())
C=list(map(int,input().split()))
S=[]
S_max=[]
for i in range(D):
    s=list(map(int,input().split()))
    S_max.append(max(s))
    S.append(s)

minus=365*sum(C)

for i in range(D):
    A=S[i]
    ma=S_max[i]
    print(A.index(ma)+1)
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
elif Num == 6:
		Ans = 90000 + 900 + 9    
print(Ans)

### FIXED CODE ###

A,B,C=map(int,input().split())
print(0 if C<A-B else C-(A-B))
N = int(input())
lis = str(input())
a = []
b = []
for pair in itertools.combinations(lis, 3):
    a.append(list(pair))

lis_num = range(len(lis))
for i in itertools.combinations(lis_num, 3):
    b.append(list(i))

count = 0
for i in range(len(a)):
    if (a[i][0]!=a[i][1] and a[i][1]!=a[i][2] and a[i][2] != a[i][0] and b[i][0]!=b[i][1] and b[i][1] != b[i][2]):
        count += 1
print(count)

### FIXED CODE ###

s = str(input())

if(s[0]=='7'): print('Yes')
elif(s[1]=='7'): print('Yes')
elif(s[2]=='7'): print('Yes')
else: print('No')
s = input()
r = []
for i in range(1,6):
  for j in range(len(s)-i):
    r.append(s[j:j+i])
print(sorted((set(r)))[int(input())-1])

### FIXED CODE ###

s = input()
r = []
for i in range(1,6):
  for j in range(len(s)-i+1):
    r.append(s[j:j+i])
print(sorted((set(r)))[int(input())-1])
ll=[list(map(int,input().split())) for i in range(3)]
for i in range(2):
  for j in range(i+1,3):
    for k in range(3):
      if ll[k][i]==ll[k][j]:
          if not all(ll[t][i]==ll[t][j] for t in range(3)):
            print('No')
            exit()
      if ll[i][k]==ll[j][k]:
        if not all(ll[i][t]==ll[j][t] for t in range(3)):
          print('No')
          exit()
s=0
for lll in ll:
  s=sum(lll)
  su+=s
if su%3!=0:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

l=[list(map(int,input().split())) for i in range(3)]
x=l[0][0]
y=l[0][1]
z=l[0][2]
a=0
b=l[1][0]-x
c=l[2][0]-x
if b+y==l[1][1] and b+z==l[1][2] and c+y==l[2][1] and c+z==l[2][2]:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())

tsuro = [list(map(int, input().split())) for _ in range(m)]

ikeru = [set() for _ in range(n+1)]

for i,j in tsuro:
    ikeru[i].add(j)
    ikeru[j].add(i)

ans = [n+5]*(n+1)
visited = [n+5]*(n+1)

def dfs(mae,heya,kaiso):
    if visited[heya] <= kaiso:
        return True
    else:
        visited[heya] = kaiso
        ans[heya] = mae
        for j in ikeru[heya]:
            dfs(heya, j, kaiso+1)
        return True

hantei = True
if dfs(0,1,0):
    for i in range(1, n+1):
        if visited[i] == n+5:
            hantei = False
    if hantei:
        print('Yes')
        for j in range(2,n+1):
            print(ans[j])
    else:
        print('No')


### FIXED CODE ###

from collections import deque

n, m = map(int,input().split())
graph =[[] for _ in range(n+1)]
for _ in range(m):
    a,b =map(int, input().split())
    graph[a].append(b)
    graph[b].append(a)
queue = deque([1])
visited = [False] * (n+1)
visited[0] = True
ans = [0] * (n+1)
while queue:
    node = queue.popleft()
    for xnode in graph[node]:
        if visited[xnode]:
            continue
        ans[xnode]=node
        visited[xnode]=True
        queue.append(xnode)
print("Yes")
for a in ans[2:]:
    print(a)
import fractions
N = int(input())
values = ([int(x) for x in input().split()])

gcd_from_the_left = []
gcd_from_the_left.append(values[0])
for i in range(N):
	gcd_from_the_left.append(fractions.gcd(gcd_from_the_left[i],values[i]))
gcd_from_the_left.pop(0)

gcd_from_the_right = []
gcd_from_the_right.append(values[-1])
for i in range(N):
	gcd_from_the_right.append(fractions.gcd(gcd_from_the_right[i],values[-i-1]))

gcd_from_the_right.pop(0)

ans = 0
gcd = 0

for i in range(N-2):
  gcd = fractions.gcd(gcd_from_the_left[i],gcd_from_the_right[N-3+i])
  if gcd > ans:
    ans = gcd
    
gcd = gcd_from_the_left[-2]
if gcd > ans:
  ans = gcd
gcd = gcd_from_the_right[-2]
if gcd > ans:
  ans = gcd
print(ans)

### FIXED CODE ###

import fractions
N = int(input())
values = ([int(x) for x in input().split()])

gcd_from_the_left = []
gcd_from_the_left.append(values[0])
for i in range(N):
	gcd_from_the_left.append(fractions.gcd(gcd_from_the_left[i],values[i]))
gcd_from_the_left.pop(0)

gcd_from_the_right = []
gcd_from_the_right.append(values[-1])
for i in range(N):
	gcd_from_the_right.append(fractions.gcd(gcd_from_the_right[i],values[-i-1]))

gcd_from_the_right.pop(0)

ans = 0
gcd = 0

for i in range(N-2):
  gcd = fractions.gcd(gcd_from_the_left[i],gcd_from_the_right[N-i-3])
  if gcd > ans:
    ans = gcd
    
gcd = gcd_from_the_left[-2]
if gcd > ans:
  ans = gcd
gcd = gcd_from_the_right[-2]
if gcd > ans:
  ans = gcd
print(ans)
D, N = map(int, input().split())

print([100 ** D * i for i in range(101) if i%100 != 0][N-1])

### FIXED CODE ###

D, N = map(int, input().split())
print([100 ** D * i for i in range(102) if i%100 != 0][N-1])
# math.gcd()を使う
import math
N, X = map(int, input().split())
# 一行の入力をリストxに入れる
x = list(map(int, input().split()))
# すべての(x[i]-X)の最大公約数が答え
# 最初の最大公約数
t = x[0] - X
for a in x:
    # 最大公約数を更新
    t = math.gcd(t, a - X)
print(t)


### FIXED CODE ###

A, B = map(int, input().split())
if A % 2 is 0 or B % 2 is 0:
    print('No')
else:
    print("Yes")
n, m, v, p = map(int, input().split())
alst = list(map(int, input().split()))
alst.sort(reverse = True)
left = p - 1
right = n + 1
while right - left > 1:
    pos = (left + right) // 2
    if alst[pos] + m < alst[p - 1]:
        right = pos
        continue
    cnt = (p - 1 + n - pos) * m
    base = alst[pos] + m
    for i in range(p, pos):
        cnt += min(m, base - alst[i])
    if cnt >= m * v:
        left = pos
    else:
        right = pos
print(right)

### FIXED CODE ###

n, m, v, p = map(int, input().split())
alst = list(map(int, input().split()))
alst.sort(reverse = True)
left = p - 1
right = n
while right - left > 1:
    pos = (left + right) // 2
    if alst[pos] + m < alst[p - 1]:
        right = pos
        continue
    cnt = (p - 1) * m
    base = alst[pos] + m
    for i in range(p - 1, n):
        cnt += min(m, base - alst[i])
    if cnt >= m * v:
        left = pos
    else:
        right = pos
print(left + 1)
X,A = [int(x) for x in input().split()]
print(10 if x >= A else 0)

### FIXED CODE ###

X,A = [int(x) for x in input().split()]
print(10 if X >= A else 0)
C0=0
C1=0
C2=0
C3=0
N=int(input())
S=list(range(N))
for i in range(N):
  S[i] = input()
for i in range(N):
  if S[i]==AC:
    C0 += 1
  elif S[i]==WA:
    C1 += 1
  elif S[i]==TLE:
    C2 += 1
  else:
    C3 += 1
print("AC","x",C0)
print("WA","x",C1)
print("TLE","x",C2)
print("RE","x",C3)

### FIXED CODE ###

C0=0
C1=0
C2=0
C3=0
N=int(input())
S=list(range(N))
for i in range(N):
  S[i] = input()
for i in range(N):
  if S[i]=="AC":
    C0 += 1
  elif S[i]=="WA":
    C1 += 1
  elif S[i]=="TLE":
    C2 += 1
  else:
    C3 += 1
print("AC","x",C0)
print("WA","x",C1)
print("TLE","x",C2)
print("RE","x",C3)
from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1

if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) %mod
            k -= 1
            break
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 1
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else 0
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)

### FIXED CODE ###

from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1
if n == k:
    for i in a:
        res = (res * i) %mod
    print(res)
    exit()
    
if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) % mod
            break
        
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 0
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else 0
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)
N, X = map(int,input().split())
L = list(map(int, input().split()))

i = 0
D = 0

while D <= X:
    D = D + L[i]
    i = i + 1

print(i)

### FIXED CODE ###

N, X = map(int,input().split())
L = list(map(int, input().split()))

i = 1
D = 0

for l in L:
    D = D + l
    if X < D:
        break
    i = i +1
print(i)
N, K = map(int,input().split())
A = list(map(int,input().split()))
X = [-1 for j in range(N)]
X[0] = 0
Y = [0]
i = 0
Num = 0
MM = 0
for k in range(1,N):
  i = A[i]-1
  if k == K:
    MM = 1
    P = i
  elif X[i] != -1:
    Num = X[i]
    break
  else:
    X[i] = k
    Y.append(i)
Y = Y[Num:]
B = (K-Num)%len(Y)
if MM = 1:
  print(P+1)
else:
  print(Y[B]+1)

### FIXED CODE ###

N, K = map(int,input().split())
A = list(map(int,input().split()))
X = [-1 for j in range(N)]
X[0] = 0
Y = [0]
i = 0
Num = 0
MM = 0
for k in range(1,N):
  i = A[i]-1
  if k == K:
    MM = 1
    P = i
    break
  elif X[i] != -1:
    Num = X[i]
    break
  else:
    X[i] = k
    Y.append(i)
Y = Y[Num:]
B = (K-Num)%len(Y)
if MM == 1:
  print(P+1)
else:
  print(Y[B]+1)
N=int(input())
X=[int(input())]

def insert_search(List,a,l,r):
  if r==l:
    List[l-1]=a
    return List
  m=(l+r)//2
  if List[m]<a:
    return insert_search(List,a,m+1,r)
  elif Lisr[m]!=a:
    return insert_search(List,a,l,m-1)
  else:
    while List[m]==a:
      m-=1
    List[m]=a
    return List
for i in range(N-1):
  a=int(input())
  if a>X[-1]:
    X[-1]=a
  elif X[0]>=a:
    X.insert(0,a)
  else:
    X=insert_search(X,a,0,len(X)-1)
print(len(X))

### FIXED CODE ###

N=int(input())
from collections import deque
d = deque([int(input())]) 
import bisect

for i in range(N-1):
  a=int(input())
  if a>d[-1]:
    d[-1]=a
  elif d[0]>=a:
    d.appendleft(a)
  else:
    i=bisect.bisect_left(d,a)
    d[i-1]=a
print(len(d))
N = int(input())
S = input()
Answer_list = []

for i in list(S):
    num = ord(i)+N
    if num >= 65 || num =< 90:
        Answer_list.append(chr(num))
    elif num < 90:
        Answer_list.append(chr(num - 26)        
print(''.join(Answer_list))

### FIXED CODE ###

N = int(input())
S = input()
Answer_list = []
for i in list(S):
    num = ord(i)+N
    if num >= 65 and num <= 90:
        Answer_list.append(chr(num))
    elif num > 90:
        Answer_list.append(chr(num - 26))
print(''.join(Answer_list))
S = input()
T = input()
Ns = len(S)
Nt = len(T)
if Ns<Nt:
   print("UNRESTORABLE")
else:
   S_merge=""
   isok = True
   for i in range(Ns-Nt,-1,-1):
      isok = True
      # print(S[i:i+Nt], T)
      for j in range(Nt):
         if not (S[i+j] == T[j] or S[i+j]=="?"):
            isok = False
            continue
      if isok:
         # print(S[i:i+Nt], T)
         # print(S[:i]+T)
         S_merge = S[:i]+T
         break
   if not isok:
      print("UNRESTORABLE")
   else:
      # print(S_merge)
      S_ans =""
      for i in range(Ns):
         if S_merge[i]=="?":
            S_ans = S_ans+'a'
         else:
            S_ans = S_ans+S_merge[i]
      print(S_ans)



### FIXED CODE ###

S = input()
T = input()
Ns = len(S)
Nt = len(T)
if Ns<Nt:
   print("UNRESTORABLE")
else:
   S_merge=""
   isok = True
   for i in range(Ns-Nt,-1,-1):
      isok = True
      # print(S[i:i+Nt], T)
      for j in range(Nt):
         if not (S[i+j] == T[j] or S[i+j]=="?"):
            isok = False
            break
      if isok:
         # if i > 0:
         S_merge = S[:i]+T+S[i+Nt:]
         # else:
         #    S_merge = T
         break
   if not isok:
      print("UNRESTORABLE")
   else:
      # print(S_merge)
      S_ans =""
      for i in range(Ns):
         if S_merge[i]=="?":
            S_ans = S_ans+'a'
         else:
            S_ans = S_ans+S_merge[i]
      print(S_ans)
from math import ceil
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(0)
    exit()
if w % 2 == 0:
    ans = (w // 2) * h
else:
    ans = (w // 2) * h + (ceil(h / 2))
print(ans)

### FIXED CODE ###

l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
     1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) - 1
print(l[k])
import sys
from collections import deque
input = sys.stdin.readline
sys.setrecursionlimit(10000)
N = int(input())
D = [deque([]) for _ in range(N)]
cnt = 0
AB = [0] * (N-1)
dic = {}
for n in range(N-1):
    a, b = [int(x) for x in input().strip().split()]
    AB[n] = (a-1, b-1)
    dic[(a, b)] = 0
    D[a-1].append(b-1)
    D[b-1].append(a-1)

print(max([len(d) for d in D]))

def dp(pp, p, c):
    global dic
    nc = 1
    for np in D[p]:
        if np == pp:
            continue
        if nc == c:
            nc += 1
        dic[(p, np)] = nc
        dp(p, np, nc)
        nc += 1
    return 0

dp(-1, 0, 0)
for ab in AB:
    print(dic[ab])

### FIXED CODE ###

import sys
from collections import deque
input = sys.stdin.readline
sys.setrecursionlimit(100000)
N = int(input())
D = [deque([]) for _ in range(N)]
cnt = 0
AB = [0] * (N-1)
dic = {}
for n in range(N-1):
    a, b = [int(x) for x in input().strip().split()]
    AB[n] = (a-1, b-1)
    dic[(a, b)] = 0
    D[a-1].append(b-1)
    D[b-1].append(a-1)

print(max([len(d) for d in D]))

def dp(pp, p, c):
    global dic
    nc = 1
    for np in D[p]:
        if np == pp:
            continue
        if nc == c:
            nc += 1
        dic[(p, np)] = nc
        dp(p, np, nc)
        nc += 1
    return 0

dp(-1, 0, 0)
for ab in AB:
    print(dic[ab])
import math
def solve(N, X, cities):
    dists = [abs(city - X) for city in cities]
    gcd = min(dists)
    for d in dists:
        if d % gcd == 0:
            continue
        else:
            gcd = math.gcd(gcd, d)
    return gcd

if __name__ == "__main__":
    l = input()
    N, X = int(l.split()[0]),int(l.split()[1])
    cities = [int(c) for c in input().split()]
    print(solve(N, X, cities))


### FIXED CODE ###


def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

def solve(N, X, cities):
    dists = [abs(city - X) for city in cities]
    ans = min(dists)
    for d in dists:
        if d % ans == 0:
            continue
        else:
            ans = gcd(ans, d % ans)
    return ans

if __name__ == "__main__":
    l = input()
    N, X = int(l.split()[0]),int(l.split()[1])
    cities = [int(c) for c in input().split()]
    print(solve(N, X, cities))