Harryxun/stf_run huggingface dataset:
import math

n=int(input())
ans=int(input())

if n>1:
  
  for x in range(n-1):
    s=int(input())
    ans=int(ans*s/(math.gcd(ans,s)))
    
  
print(ans)

### FIXED CODE ###

import math

n=int(input())
ans=int(input())

if n>1:
  
  for x in range(n-1):
    s=int(input())
    ans=ans*s//(math.gcd(ans,s))
    
  
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 24 18:23:54 2018
ITP22A
@author: maezawa
"""

n, q = list(map(int, input().split()))
a = [[] for _ in range(n)]

for i in range(q):
    c = list(map(int, input().split()))
    if c[0] == 0:
        a[c[1]].append(c[2])
    elif c[0] == 1:
        if a[c[1]]:
            print(a[c[1]][-1])
    else:
        a[c[1]].pop()




### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Jun 24 18:23:54 2018
ITP22A
@author: maezawa
"""

n, q = list(map(int, input().split()))
a = [[] for _ in range(n)]

for i in range(q):
    c = list(map(int, input().split()))
    if c[0] == 0:
        a[c[1]].append(c[2])
    elif c[0] == 1:
        if a[c[1]]:
            print(a[c[1]][-1])
    else:
        if a[c[1]]:
            a[c[1]].pop()
import sys

n1, n2 = [int(i) for i in input().split()]

if (n1 % 2) != (n2 % 2):
    sys.exit("IMPOSSIBLE")

r1 = int((n1 + n2) / 2)
print(r1)

### FIXED CODE ###

import sys

n1, n2 = [int(i) for i in input().split()]

if (n1 % 2) != (n2 % 2):
    print("IMPOSSIBLE")
    sys.exit()

r1 = int((n1 + n2) / 2)
print(r1)
# -*- coding: utf-8 -*-
import math
N, K = map(int, input().split())
A = input().split()
AK = [[0 for j in range(N)] for i in range(2)]
for l in range(N):
  AK[0][l] = int(AK[0][l]) + int(A[l])
p = min(K,50)
for m in range(1,p+1,1):
  for o in range(N):
    if AK[0][o] == N:
      AK[1] = AK[1]+1
    else:
      for x in range(N):
        if((o-AK[0][o]+0.5) < (x+1)) and ((x+1) < (o+AK[0][o]+1.5)):
          AK[1][x] = AK[1][x] +1
  AK[0] = AK[1]
  AK[1] = [0] * N
print(*AK[0])

### FIXED CODE ###

# -*- coding: utf-8 -*-
s = input()
# 出力
print(s[0:3])
N, X = map(int, input().split())
L = list(map(int, input().split()))

c = 1
d = 0
for x in L:
    d = d + x
    if d <= X :
        ans += 1

print(ans)

### FIXED CODE ###

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

ans = 1
d = 0
for x in L:
    d = d + x
    if d <= X :
        ans += 1

print(ans)
#create environment
import numpy as pd
num = 1
i = 1
k = 1
df = pd.DataFrame()
count_num = 0
f = lambda x: (x**2)

#input1 N D (numeric)
N, D = map(int, input().split())
#input2
for l in (1, N):
  a = map(int, input().split())
  if a is none:
    break
  df[l] = a

# make combination
df_new = df.T
#a_new = a.T
print(df_new)
for i in range(0, len(df_new.index)):
  for j in range(k, len(df_new.index)):
#    print_str = str(i) + '-' + str(j)
#    print(print_str)
    k = k + 1
    df_new_ij = df_new.loc[[i,j],:]
    obj_num = np.sqrt(df_new_ij.apply(f).cumsum().iloc[1,:].cumsum()[len(df['a'])-1])
    
    if obj_num == round(obj_num):
      count_num = count_num + 1

#print
print(count_num)






### FIXED CODE ###

import math
n, d = map(int, input().split())
x = []
ans=0
for i in range(n):
        o = list(map(int, input().split()))
        x += [o]
for i in range(n):
        for j in range(i+1,n):
                dis_net = 0
                dis=0
                for u in range(d):
                        dis += (x[i][u] - x[j][u])** 2
                dis_net = math.sqrt(dis)
                if dis_net % 1 == 0 and dis_net>=1:
                        ans += 1
print(ans)
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s..lower().split()
        if w == w0:
            c += 1
print c

### FIXED CODE ###

w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s.lower().split():
        if w == w0:
            c += 1
print c
import numpy as np
N,W = map(int,input().split())
dp = np.full(N*1000+1,W+1)
dp[0] = 0
for _ in range(N):
    w,v = map(int,input().split())
    dp[v:]=np.minimum(dp[v:],dp[:-v]+w)
print(np.where(dp<=W)[0][-1])

### FIXED CODE ###

n,*h=map(int,open(0).read().split())
dp=[10**18]*(n+1)
dp[0]=0
h=h+[0]
for i in range(n-1):
  dp[i+1]=min(dp[i+1],dp[i]+abs(h[i+1]-h[i]))
  dp[i+2]=min(dp[i+2],dp[i]+abs(h[i+2]-h[i]))
print(dp[n-1])
test_list=[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]
index=int(input())
print(test_list[index])
      

### FIXED CODE ###

n=int(input())
li = [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]
print(li[n-1])
# input
N = int(input())
A = []
append = A.append

for i in range(N):
    append(int(input()))

# check
set_A = list(set(A))
for a in A:
    print(max([sa for sa in set_A if sa != a]))

### FIXED CODE ###

# input
N = int(input())
A = []
append = A.append

for i in range(N):
    append(int(input()))

sort_A = sorted(A, reverse=True)[:2]

# check
for a in A:
    if a == sort_A[0]:
        print(sort_A[1])
    else:
        print(sort_A[0])
a = list(input())
b = list(input())
c = list(input())

print(a[0] + b[1] + c[2]

### FIXED CODE ###

a = list(input())
b = list(input())
c = list(input())

print(a[0] + b[1] + c[2])
from itertools import combinations

n = int(input())
r = range(n)
a = [([], []) for _ in r]
for i in r:
  for _ in range(int(input())):
    x, y = map(int, input().split())
    a[i][y].append(x - 1)

fail = lambda x: not all(x.isdisjoint(a[i][0] and x.issuperset(a[i][1])) for i in x)

while all(map(fail, map(set, combinations(r, n)))):
  n -= 1
print(n)


### FIXED CODE ###

from itertools import combinations

n = int(input())
r = range(n)
a = [(set(), set()) for _ in r]
for i in r:
  for _ in range(int(input())):
    x, y = map(int, input().split())
    a[i][y].add(x - 1)

fail = lambda x: (not all(a[i][0].isdisjoint(x) and a[i][1] < x for i in x))

while n and all(map(fail, map(set, combinations(r, n)))):
  n -= 1
print(n)
N = int(input())
S = input()

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

### FIXED CODE ###

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

ans=""
for x in S:
    nc=ord(x)
    nc+=N
    if nc>90:
        nc-=26
    ans+=chr(nc)
print(ans)
import math
X=int(input())
answers=[]
for a in range(-math.ceil(X**0.2),math.ceil(X**0.2)+1):
    for b in range(-math.ceil(X**0.2),math.ceil(X**0.2)+1):
        if a**5-b**5==X:
            answers.append(a)
            answers.append(b)
            break
print(answers[0],answers[1])


### FIXED CODE ###

import math
X=int(input())
a=pow(10,9)
c=math.ceil(a**0.3)
answers=[]
for a in range(-c,c+1):
    for b in range(-c,c+1):
        if pow(a,5)-pow(b,5)==X:
            answers.append(a)
            answers.append(b)
            break
print(answers[0],answers[1])
from collections import *
d=defaultdict(list)
n,m=map(int,input().split())
 
for s in range(m):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
#print(d)

def BELLMANFORD(point,d):
    cost       = {node:-float("inf")for node in range(1,n+1)}
    preference = {node:None         for node in range(1,n+1)}      #最適路のこと 
    cost[point]= 0
    for i in range(n-1):                                  #経路の長さは最大n-1であるため
        for now,lis in d.copy().items():
            for nex,c in lis:
                if cost[nex]<cost[now]+c:
                    cost[nex]=cost[now]+c
                    preference[nex]=now

    negative=[0]*n                                        #負閉路の長さは最大nであるため
    
    for i in range(n):                  #閉路判定
        for now,lis in d.copy().items():
            for nex,c in lis:
                if negative[now]==1:
                    negative[nex]=1
                if cost[nex]<cost[now]+c:
                    cost[nex]=cost[now]+c
                    preference[nex]=now
                    negative[now-1]=1

    return cost,negative

x,y=(BELLMANFORD(1,d))
#print(x,y)
if y[n-1]==1:
    print("inf")
else:
    print(x[n])

### FIXED CODE ###

from collections import *
d=defaultdict(list)
n,m=map(int,input().split())
 
for s in range(m):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
#print(d)

def BELLMANFORD(point,d):
    cost       = {node:-float("inf")for node in range(1,n+1)}
    preference = {node:None         for node in range(1,n+1)}      #最適路のこと 
    cost[point]= 0
    for i in range(n-1):                                  #経路の長さは最大n-1であるため
        for now,lis in d.copy().items():
            for nex,c in lis:
                if cost[nex]<cost[now]+c:
                    cost[nex]=cost[now]+c
                    preference[nex]=now

    negative=[0]*n                                        #負閉路の長さは最大nであるため
    
    for i in range(n):                  #閉路判定
        for now,lis in d.copy().items():
            for nex,c in lis:
                if negative[now-1]==1:
                    negative[nex-1]=1
                if cost[nex]<cost[now]+c:
                    cost[nex]=cost[now]+c
                    preference[nex]=now
                    negative[now-1]=1

    return cost,negative

x,y=(BELLMANFORD(1,d))
#print(x,y)
if y[n-1]==1:
    print("inf")
else:
    print(x[n])
n,l=map(int,raw_input().split())
l=[]
for i in range(n):
    l.append(raw_input())
l.sort()
print ''.join(l)

### FIXED CODE ###

l=map(int,raw_input().split())
if l.count(5)==2 and l.count(7)==1  :
    print 'YES'
else:
    print 'NO'
B = map(int, input().split())
q = (B-1)//(A-1)

print(q)

### FIXED CODE ###

A, B = map(int, input().split())
q = -((-B+1)//(A-1))
 
print(q)
N = int(input())
S = input()
if N == 1:
  print("No")
if S[:(N//2) == S[(N//2+1):]:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

N = int(input())
S = input()
if S[:(N//2)] == S[(N//2):]:
	print("Yes")
else:
	print("No")
K = int(input())
A, B = int(input().split())

if B - A >= K-1:
    print("OK")
else:
    print("NG")

### FIXED CODE ###

K = int(input())
A, B = map(int, input().split())
print("OK" if A <= B//K*K else "NG" )
# coding: utf-8
data = input().split(" ")

N = int(data[0])
A = int(data[1])
B = int(data[2])

total_sum = 0

for i in range(N+1):
    sum = 0
    tmp = i
    while tmp > 0:
        sum += tmp % 10;
        tmp = int(tmp/10)
    if sum >= A and sum <= B:
        total_sum += i

print(total_sum)
    

### FIXED CODE ###

# coding: utf-8
N = int(input())
X = N
f = 0
while N > 0:
    f += N % 10;
    N = int(N / 10)

if X%f == 0:
    print("Yes")
else:
    print("No")
X = int(input())

K=1
y=X % 360
while y != 0:
  K+=1
  y=(y+X)% 360
#
print(k)



### FIXED CODE ###

X = int(input())

K=1
y=X % 360
while y != 0:
  K+=1
  y=(y+X)% 360
#
print(K)
H = int(input())
count = 0

def helper(x):
  if x == 1:
    return 1
  return helper(x/2) * 2 + 1

print(helper(H))

### FIXED CODE ###

H = int(input())
count = 0

def helper(x):
  if x == 1:
    return 1
  return helper(x//2) * 2 + 1

print(helper(H))
n,x = map(int,input().split())
listl = []
listl += map(int,input().split())
# print(listl)

cnt=0
d=0
# print(d)
while d <= x:
    d = d+listl[cnt]
    # print(d)
    cnt+=1

print(cnt)

### FIXED CODE ###

n,x = map(int,input().split())
l = list(map(int,input().split()))
# print(listl)

cnt=1
d=0
# print(d)
for i in range(len(l)):
    d = d+l[i]
    if d > x:
        break
    # print(d)
    cnt+=1

print(cnt)
def localInp():
    import sys
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')

def find(s,t):
    if (len(s)==0 or len(t)==0):
        return ""
    if(s[0]==t[0]):
        if(len(s)==1 or len(t)==1):
            return s[0]
        return s[0]+find(s[1:],t[1:])
    x=y=""
    if(len(t)>1):
        x=find(s,t[1:])
    if(len(s)>1):
        y=find(s[1:],t)
    if(len(x)>len(y)):
        return x
    else:
        return y
def solve():
    s=input()
    t=input()
    ans=find(s,t)
    print(ans)

#solve()



localInp()
# t=int(input())
t=1
for i in range(t):
    # print("Case",i+1)
    solve()


### FIXED CODE ###

from subprocess import*
call(('pypy3','-c',"""
s=input()
t=input()
a=len(s)
b=len(t)
dp=[[0]*(b+1) for i in range(a+1)]
for i in range(a):
  for j in range(b):
    if s[i]==t[j]:
      dp[i+1][j+1]=dp[i][j]+1
    else:
      dp[i+1][j+1]=max(dp[i][j+1],dp[i+1][j])
res=''
while a!=0 and b!=0:
  if dp[a][b]==dp[a-1][b]:
    a-=1
  elif dp[a][b]==dp[a][b-1]:
    b-=1
  else:
    a-=1
    b-=1
    res=s[a]+res
print(res)
"""))
"""
from subprocess import*
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
# import numpy as np
starttime = time.time()
# import numpy as np
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    # sys.setrecursionlimit(int(pow(10,6)))
    # sys.stdin = open("input.txt", "r")
    # sys.stdout = open("../output.txt", "w")
except:
    pass

"""
import math

n, m = map(int, input().split(" "))
numbers = list(set(map(int, input().split(" "))))

for i in range(len(numbers)):
    if i == 0:
        gcd = numbers[i]
        lcm = numbers[i]
    else:
        gcd = math.gcd(gcd, numbers[i])
        lcm = int(lcm * numbers[i] / math.gcd(lcm, numbers[i]))

if int(lcm/gcd) % 2 == 0:
    print(0)
else:
    init_num = lcm / 2
    print(int(m - init_num) // lcm + 1)
    

### FIXED CODE ###

# coding: utf-8
# Your code here!
 
import fractions
 
n, m = map(int, input().split(" "))
numbers = list(set(map(int, input().split(" "))))
 
for i in range(len(numbers)):
    if i == 0:
        gcd = numbers[i]
        lcm = numbers[i]
    else:
        gcd = fractions.gcd(gcd, numbers[i])
        lcm = (lcm * numbers[i]) // fractions.gcd(lcm, numbers[i])
 
if (lcm//gcd) % 2 == 0:
    print(0)
else:
    init_num = lcm // 2
    print((m - init_num) // lcm + 1)
n = list(int(input())

cnt = 0

for i in range(len(n)):
    if n[i] == 2:
        cnt += 1
print(cnt)

### FIXED CODE ###

n = list(input())

cnt = 0

for i in range(len(n)):
    if n[i] == "2":
        cnt += 1
print(cnt)
N = int(input())
X = input()
S = []
for a in range(N):
    S.append(X[a])
print(S)
if N == 1:
    print(X)
else:
    for i in range(N-1):
        if S[i] == 'X':
            continue
        elif S[i] != S[i+1]:
            continue
        else:
            j = i+1
            while S[i] == S[j]:
                j += 1
            for l in range(i+1,j):
                S[l] = 'X'
print(S)

lista = [k for k in S if k != 'X']
print(''.join(lista))

### FIXED CODE ###

N = int(input())
X = input()
S = []
for a in range(N):
    S.append(X[a])

if N == 1:
    print(1)
else:
    for i in range(1,N):
        if S[i] != S[i-1]:
            continue
        else:
            S[i-1] = 'X'
    lista = [k for k in S if k != 'X']
    print(len(lista))
n = int(input())
ar = map(int,input.split())
mul = 1
for i in ar:
  mul*=i
  if mul>1000000000000000000:
    break
if mul>1000000000000000000:
  print(-1)
else:
  print(mul)

### FIXED CODE ###

n = input()
ar = map(int,input().split())
ar = list(ar)
mul=1
ar=sorted(ar)

for i in ar:
	mul*=i
	if mul>10**18:
		break
if mul>10**18:
	print(-1)
else:
	print(mul)
n,k = map(int, input().split())
for k in range(k):
	d = int(input())
	for d in range(d):
    a.append({int(x) for x in input().split()})
    n = array_diff(n,a)
print(len(n))

### FIXED CODE ###

n,k = map(int, input().split())
flag = [1 for i in range(n)]
for _ in range(k):
  d = int(input())
  for a in map(int, input().split()):
      flag[a-1] = 0
print(sum(flag))
X = input()
Y = input()
Z = input()

A = Z
B = X
C = Y

print(f"{A} {B} {C}")

### FIXED CODE ###

X,Y,Z = map(int,input().split())
print(Z ,X ,Y)
a = list(map(int,input().split()))
b = sorted(a)
c = str(b[2])+str(b[1])
print(b[0]+c)

### FIXED CODE ###

a = list(map(int,input().split()))
b = sorted(a)
c = int(str(b[2])+str(b[1]))
print(b[0]+c)
def GcdLCM():
    
    while 1:
        x,y=map(int,input().split())
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()

### FIXED CODE ###

import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()
K, X = map(int, input().split())

total = 500 * K

if total >= X:
    print("Yes")
else:
    prnt("No")

### FIXED CODE ###

K, X = map(int, input().split())

total = 500 * K

if total >= X:
    print("Yes")
else:
    print("No")
n,k=map(int, input().split())
mod = 10**9 + 7
ans = [0]*k
import math
ans[0]=(math.factorial(2+n-k-1) // (math.factorial(2+n-k-1-n+k) * math.factorial(n-k))) %mod

for i in range(1,k):#iは仕切りの数
    spl = math.factorial(k-1) // (math.factorial(k-1- i) * math.factorial(i))#仕切りのパターン
    rest = n-k-i
    print(spl,rest)
    if rest < 0:
        break
    if rest == 0:
        ans[i] = spl%mod
    else:
        ans[i] = (spl*(math.factorial(2+i) // (math.factorial(2+i-rest) * math.factorial(rest))))%mod
for i in ans:
    print(i)

### FIXED CODE ###

n,k=map(int, input().split())
mod = 10**9 + 7
ans = [0]*k
import math
ans[0]=(math.factorial(2+n-k-1) // (math.factorial(2+n-k-1-n+k) * math.factorial(n-k))) %mod

for i in range(1,k):#iは仕切りの数
    spl = math.factorial(k-1) // (math.factorial(k-1- i) * math.factorial(i))#仕切りのパターン
    rest = n-k-i
    if rest < 0:
        break
    if rest == 0:
        ans[i] = spl%mod
    else:
        ans[i] = (spl*(math.factorial(2+i+rest-1) // (math.factorial(2+i-1) * math.factorial(rest))))%mod
for i in ans:
    print(i)
from collections import Counter as C
n = int(input())
a = list(map(int,input().split()))
c1 = C(a[::2])
c2 = C(a[1::2])
mc1 = c1.most_common(2)
mc2 = c2.most_common(2)
if mc1[0][0] == mc2[0][0]:
  if mc1[1][1] >= mc2[1][1]:
    ans = n - mc1[1][1] - mc2[0][1]
  else:
    ans = n - mc1[0][1] - mc2[][1]
print(ans)

### FIXED CODE ###

from collections import Counter as C
n = int(input())
a = list(map(int,input().split()))
c1 = C(a[::2])
c2 = C(a[1::2])
mc1 = c1.most_common(2)
mc2 = c2.most_common(2)
if mc1[0][0] != mc2[0][0]:
  ans = n - mc1[0][1] - mc2[0][1]
else:
  if len(mc1) + len(mc2) == 2:
    ans = n // 2
  elif len(mc1) == 1:
    ans = n - mc1[0][1] - mc2[1][1]
  elif len(mc2) == 1:
    ans = n - mc1[1][1] - mc2[0][1]
  else:
    if mc1[1][1] >= mc2[1][1]:
      ans = n - mc1[1][1] - mc2[0][1]
    else:
      ans = n - mc1[0][1] - mc2[1][1]
print(ans)
G,R = int(input())
A=2*G-R
print(A)

### FIXED CODE ###

R = int(input())
G = int(input())
print(2*G-R)
import collections, heapq, math, sys

n, k = map(int, sys.stdin.readline().rstrip().split(' '))
dislikes = map(int, sys.stdin.readline().rstrip().split(' '))
dislikess= set(dislikes)
for i in range(9):
  if i not in dislikess:
    smallest = i
    break
cp = n
s = []
while cp:
  s.append(cp%10)
  cp //= 10
s.append(0)
idx = -1
found = True
for i in range(len(s)):
  z = s[i]
  if i == len(s) - 1 and not found:
    s[i] = smallest
    idx = i-1
    break
  if not found or z in dislikess:
    found = False
    for j in range(z+1, 10):
      if j not in dislikes:
        s[i] = j
        found = True
        break
    if not found:
    	idx = i
    else:
    	idx = i - 1
  else:
    found = True
if s[-1] == 0:
  s.pop()
for i in range(idx+1):
  s[i] = smallest

ret = 0
while len(s):
  ret *= 10
  ret += s.pop()
print(ret)
      
      
      
      

### FIXED CODE ###

import collections, heapq, math, sys

n, k = map(int, sys.stdin.readline().rstrip().split(' '))
dislikes = map(int, sys.stdin.readline().rstrip().split(' '))
dislikess= set(dislikes)
for i in range(9):
  if i not in dislikess:
    smallest = i
    break
cp = n
s = []
while cp:
  s.append(cp%10)
  cp //= 10
s.append(0)
idx = -1
found = True
for i in range(len(s)):
  z = s[i]
  if i == len(s) - 1:
    if not found:
        if smallest == 0:
            for m in range(1, 10):
                if m not in dislikess:
                    s[i] = m
                    break
        else:
            s[i] = smallest
        idx = i-1
    break
  if not found or z in dislikess:
    found = False
    for j in range(z+1, 10):
      if j not in dislikes:
        s[i] = j
        found = True
        break
    if not found:
    	idx = i
    else:
    	idx = i - 1
  else:
    found = True
if s[-1] == 0:
  s.pop()
for i in range(idx+1):
  s[i] = smallest

ret = 0
while len(s):
  ret *= 10
  ret += s.pop()
print(ret)
def actual(X, N, P):
    for i in range(X, -1, -1):
        if i not in P:
            left = i
            break

    for i in range(X, 101):
        if i not in P:
            right = i
            break

    if abs(left - X) <= abs(right - X):
        return left
    else:
        return right


X, N = map(int, input().split())
P = input()

if P == '':
    print(X)
else:
    P = list(map(int, P.split()))
    print(actual(X, N, P))


### FIXED CODE ###

def actual(X, N, P):
    for i in range(X, -1 - 1, -1):
        if i not in P:
            left = i
            break

    for i in range(X, 101 + 1):
        if i not in P:
            right = i
            break

    if abs(left - X) <= abs(right - X):
        answer = left
    else:
        answer = right

    return answer


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

if N == 0:
    P = []
    print(actual(X, N, P))
else:
    P = list(map(int, input().split()))
    print(actual(X, N, P))
def main():
    S = list(input())
    K = int(input())
    L = len(S)
    for i in range(L):
        if ord('z') - ord(S[i]) + 1 <= K:
            K -= ord('z') - ord(S[i]) + 1
            S[i] = 'a'

    if K > 0:
        S[-1] = chr(ord(S[-1]) + K)

    print(''.join(S))




if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    S = input()
    K = int(input())
    ans = ""
    for i, s in enumerate(S):
        tmp = ord(s) - ord('a')
        if i == len(S) - 1:
            ans += chr((tmp + K) % 26 + ord('a'))
        elif s == 'a':
            ans += s
        elif 26 - tmp <= K:
            ans += 'a'
            K -= 26 - tmp
        else:
            ans += s

    print(ans)
            


if __name__ == "__main__":
    main()
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
 
  while x % y != 0:
    z = y
    y = x % y
    x = z
  return y
 
def lcm(m,n):
  return int(m * n / gcd(m,n))
 
inputNum = list(map(int, input().split()))
a = inputNum[0]
b = inputNum[1]
 
print(gcd(a,b))
print(lcm(a,b))

### FIXED CODE ###

Answer = [1, 2, 3]

A = int(input())
B = int(input())

Answer.remove(A)
Answer.remove(B)

print(Answer[0])
mod = 10**9+7
N,X,Y,Z = map(int, input().split())
Num = 1<<(X+Y+Z-1)
ng = ((((1<<X)+1)<<Y)+1)<<(Z-1)

dp = [[0]*(1<<l) for i in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(1, 11):
        for k in range(Num):
            a = (k<<j)|(1<<(j-1))
            if a&ng != ng:
                a &= Num-1
                dp[i+1][a] += dp[i][k]
                dp[i+1][1] %= mod
print((10**N-sum(dp[N]))%mod)

### FIXED CODE ###

mod = 10**9+7
N,X,Y,Z = map(int, input().split())
Num = 1<<(X+Y+Z-1)
ng = ((((1<<X)+1)<<Y)+1)<<(Z-1)

dp = [[0]*Num for i in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for k in range(Num):
        for j in range(1,11):
            a = (k<<j)|(1<<(j-1))
            if a&ng != ng:
                a &= Num-1
                dp[i+1][a] += dp[i][k]
                dp[i+1][a] %= mod
cnt = 1
for i in range(N):
    cnt *= 10
    cnt %= mod
for x in dp[N]:
    cnt -= x
    cnt %= mod
print(cnt)