Harryxun/stf_run huggingface dataset:
class FermatCombination():
    def __init__(self, size, mod):
        self.mod = mod
        self.factrial = [1]
        self.inverse = [1]
        for i in range(1, size + 1):
            self.factrial.append((self.factrial[i-1]*i) % self.mod)
            self.inverse.append(self.modpow(self.factrial[i], self.mod - 2) % self.mod)

    def modpow(self, x, n):
        ret = 1
        while(n > 0):
            if n & 1:
                ret = ret * x % self.mod
            x = x * x % self.mod
            n >>= 1
        return ret

    def combine(self, n, k):
        return self.factrial[n] * self.inverse[k] % self.mod * self.inverse[n - k] % self.mod


N, K = map(int, input().split())
mod = 10**9+7

fermat = FermatCombination(N - K + 2, mod)

for i in range(1, K+1):
    print(fermat.combine(N-K+1, i) * fermat.combine(K-1, i-1))




### FIXED CODE ###


class FermatCombination():
    def __init__(self, size, mod):
        self.mod = mod
        self.factrial = [1]
        self.inverse = [1]
        for i in range(1, size + 1):
            self.factrial.append((self.factrial[i-1]*i) % self.mod)
            self.inverse.append(self.modpow(self.factrial[i], self.mod - 2) % self.mod)

    def modpow(self, x, n):
        ret = 1
        while(n > 0):
            if n & 1:
                ret = ret * x % self.mod
            x = x * x % self.mod
            n >>= 1
        return ret

    def combine(self, n, k):
        return self.factrial[n] * self.inverse[k] % self.mod * self.inverse[n - k] % self.mod


N, K = map(int, input().split())
mod = 10**9+7

fermat = FermatCombination(N + 2, mod)

for i in range(1, K+1):
    if N-K+1 < i:
        print(0)
    else:
        print(fermat.combine(N-K+1, i) * fermat.combine(K-1, i-1) % mod)
import sys
x = int(sys.stdin.read().strip())
print int(not x)

### FIXED CODE ###

import sys
x = int(sys.stdin.read().strip())
print(int(not x))
n = int(input())
d = 1000000000000000000000
for i in range(1, int(sqrt(n))+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)

### FIXED CODE ###

from math import sqrt
n = int(input())
d = 1000000000000000000000
for i in range(1, int(sqrt(n))+1):
  if n % i == 0:
    d = min(d, i + n // i - 2)
print(d)
n=int(input())
a,c,i=[],0,1
while i <= n:
    if c==0:
        x=i
        if x%3==0:
            print(' '+i, end='')
            i+=1
            continue
    c=0
    if x%10==3:
        print(' '+i, end='')
        i+=1
        continue
    x//=10
    if x == 0:
        i+=1
        continue
    else:
        c=1
print()

### FIXED CODE ###

n=int(input())
c,i=0,1
while i <= n:
    if c==0:
        x=i
        if x%3==0:
            print(' '+str(i), end='')
            i+=1
            continue
    c=0
    if x%10==3:
        print(' '+str(i), end='')
        i+=1
        continue
    x//=10
    if x == 0:
        i+=1
        continue
    else:
        c=1
print()
h,a=mp(int,input().split());print(h//a+1 if h%a!=0 else h//a)

### FIXED CODE ###

h,a=map(int,input().split());print(h//a+1 if h%a!=0 else h//a)
N = int(input()) #家の数

list = []
for i in N :
    a = input()
    list.append(a)

print(int(list[N])-int(list[0]))


### FIXED CODE ###

input()
a = sorted(map(int, input().split()))
print(a[-1]-a[0])
a,b,c = map(int, input().split())
return "Yes" if a==b==c else "No"

### FIXED CODE ###

a,b,c = map(int, input().split())
ans = "Yes" if a==b==c else "No"
print(ans)
N=input()
S,T=input().split
print(*[s+t for s,t in zip(S,T)],sep="")


### FIXED CODE ###

N=input()
S,T=input().split()
print(*[s+t for s,t in zip(S,T)],sep="")
N,K = map(int,input().split())
ary = [0]+list(map(int,input().split()))
ary = sorted(ary)
a = ary.index(0)
ans = float("Inf")
for i in range(N+1):
        if i == a:continue
        k = abs(i - a)
        d = abs(ary[i])
        if k >= K and ans > d:
            ans = d
        if i <= a:
            k = K - abs(i-a)
            d = abs(ary[i])
            if k > 0:
                d += abs(ary[i] - ary[k+a])
                if ans > d:
                    ans = d
print(0 if ans == float("Inf") else ans)

### FIXED CODE ###

N, K = map(int, input().split())
ary = [0] + list(map(int, input().split()))
ary.sort()
zero = ary.index(0)
a = [abs(i - zero) for i in range(N + 1)]
ary.pop(zero)
ans = float("Inf")
for i in range(N - K + 1):
    b = N - i - 1
    d = abs(ary[i])
    if a[i] >= K:
        ans = min(ans, d)
    ans = min(ans, d + abs(ary[i] - ary[i + K - 1]))
    d = abs(ary[b])
    if a[b] >= K:
        ans = min(ans, d)
    ans = min(ans, d + abs(ary[b] - ary[b - K + 1]))
print(ans)
a,op,b=input().split()
if op == "+":print(a+b)
else:print(a-b)

### FIXED CODE ###

a,op,b=input().split()
if op == "+":print(int(a)+int(b))
else:print(int(a)-int(b))
a,b,k = map(int,input().split())

if k>a:
    k = k-a
    a = 0

    if k>b:
        k = k-b
        b = 0
    else:
        b = b-k
else:
    a = a-k

print(f"{a} {b}")

### FIXED CODE ###

a,b,k = map(int,input().split())

if k>a:
    k = k-a
    a = 0

    if k>b:
        k = k-b
        b = 0
    else:
        b = b-k
else:
    a = a-k

print(a,b)
import math
n = int(input())
print(( 2 * n ) //math.gcd(2, n))


### FIXED CODE ###

n = int(input())
if n % 2 == 0:
    print(n)
else:
    print(n * 2)
n=int(input())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i]=map(int,input().split())
y=max(a)
print(y+b[y])

### FIXED CODE ###

n=int(input())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i]=map(int,input().split())
y=max(a)
print(y+b[a.index(y)])
1 N = int(input())
2 s = [input() for i in range(N)]
3 for v in ['AC', 'WA', 'TLE', 'RE']:
4 print('{0} x {1}'.format(v, s.count(v)))

### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
 print('{0} x {1}'.format(v, s.count(v)))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
h,w = map(int,readline().split())

lst1 = [list(map(int,readline().split())) for i in range(h)]
ans = []
for i in range(h):
    for j in range(w-1):
        if lst1[i][j] %2 == 1:
            ans.append([i,j,i,j+1])
            lst1[i][j+1] += 1

for i in range(h-1):
    if lst1[i][-1] %2 == 1:
        ans.append([i,j,i+1,j])
        lst1[i+1][j] += 1

print(len(ans))
for i in ans:
    print(i[0]+1,i[1]+1,i[2]+1,i[3]+1) 

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
h,w = map(int,readline().split())

lst1 = [list(map(int,readline().split())) for i in range(h)]
ans = []
for i in range(h):
    for j in range(w-1):
        if lst1[i][j] %2 == 1:
            ans.append([i,j,i,j+1])
            lst1[i][j+1] += 1

for i in range(h-1):
    if lst1[i][-1] %2 == 1:
        ans.append([i,w-1,i+1,w-1])
        lst1[i+1][-1] += 1

print(len(ans))
for i in ans:
    print(i[0]+1,i[1]+1,i[2]+1,i[3]+1)
a,b = map(int,input().split())
     
    if a >= b*2:
        print(a-b*2)
    else:
        print(0)

### FIXED CODE ###

a,b = map(int,input().split())
if a<=b*2:
  print(0)
else:
  print(a-b*2)
A, B = map(input().split())

tmp = 1
ans = 0
while True:
    if tmp >= B:
        print(ans)
        break
    tmp += A - 1


### FIXED CODE ###

A, B = map(int, input().split())

tmp = 1
res = 0

while tmp < B:
  tmp -= 1
  tmp += A
  res += 1
  
print(res)
import math
pi=round(math.pi,7)
r=input()
print("{} {}".format(2*r*pi,r*r*pi))


### FIXED CODE ###

import math
pi=math.pi
r=float(input())
print("{:.5f} {:.5f}".format(r*r*pi,2*r*pi))
s=input()
print(input()[:3])

### FIXED CODE ###

s=input()
print(s[:3])
S, T = input().split()
print("Yes" if S == T[:-2] else "No")

### FIXED CODE ###

S = input()
T = input()
print("Yes" if S == T[:-1] else "No")
n = input()
m = (n // 7) * 7
if m == n:
    print("Yes")
elif m - n <= n // 7:
    print("Yes")
else:
     print("No")

### FIXED CODE ###

n = int(input())
m = [7 * i for i in range(15)]
for i in range(15):
    for j in range(26):
        m.append(m[i] + 4 * j)
if n in set(m):
    print("Yes")
else:
    print("No")
#! -*- coding:utf-8 -*-

def search(values,hp,vp,fruit):
	if not (0<=hp<len(values)): return
	if not (0<=vp<len(values[hp])): return
	if fruit!=values[hp][vp]: return
	values[hp][vp]=0
	search(values,hp-1,vp,fruit)
	search(values,hp+1,vp,fruit)
	search(values,hp,vp-1,fruit)
	search(values,hp,vp+1,fruit)

def solve(values):
	count=0
	for i in range(len(values)):
		for j in range(len(values[i])):
			if values[i][j] in ['@','#','*']:
				search(values,i,j,values[i][j])
				count+=1
	return count

def main():
	line,values=input(),list()
	while line!='0 0':
		H,W = list(map(int,line.split(' ')))
		value = list()
		for _ in range(H):
			value.append([x for x in input().strip()])
		values.append(value)
	for value in values:
		print(solve(value))

if __name__=='__main__':
	main():

### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)

def search(field,hp,vp,item):
	if not (0<=hp<len(field)): return
	if not (0<=vp<len(field[hp])): return
	if item!=field[hp][vp]: return
	field[hp][vp]=True
	for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]:
		search(field,hp+dh,vp+dv,item)
#	search(field,hp-1,vp,item)
#	search(field,hp+1,vp,item)
#	search(field,hp,vp-1,item)
#	search(field,hp,vp+1,item)

def solve(field):
	count,valid_items=0,set(['@','#','*'])
	for i in range(len(field)):
		for j in range(len(field[i])):
			if field[i][j] in valid_items:
				search(field,i,j,field[i][j])
				count+=1
	return count

def main():
	line = input().strip()
	while line!='0 0':
		H,W = list(map(int,line.split(' ')))
		field = list()
		for _ in range(H):
			field.append(list(input().strip()))
		print(solve(field))
		line = input().strip()

if __name__=='__main__':
	main()
import math
A, B, H, M = = map(float, open(0).read().split())

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))


### FIXED CODE ###

import math
A, B, H, M = map(int, input().split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K))
print(C)
from math import gcd
def lcm(a,b):
	p = a*b
	g = gcd(a,b);
	return p//g
MOD = int(10**9+7)
n = int(input())
a = list(map(int,input().split()))
lc = a[0];
for i in range(1,n):
	lc = lcm(a[i],lc)
ans = 0
for i in range(n):
	ans += (lc//a[i])
	ans %= MOD
print(ans)

### FIXED CODE ###

def gcd(a,b):
	if b == 0:
		return a
	return gcd(b,a%b)

def lcm(a,b):
	p = a*b
	g = gcd(a,b);
	return p//g
MOD = int(10**9+7)
n = int(input())
a = list(map(int,input().split()))
lc = a[0];
for i in range(1,n):
	lc = lcm(a[i],lc)
ans = 0
for i in range(n):
	ans += (lc//a[i])
print(ans%MOD)
import math
A,B,C,D  = map(int, input().split())
#Cの倍数
if A % C ==0:
    C_start = A // C
else:
    C_start = (A//C)+1

C_end = B//C
C_count =-C_start+C_end+1

#Dの倍数
if A % D ==0:
    D_start = A // D
else:
    D_start = (A//D)+1

D_end = B//D
D_count =-D_start+D_end+1

#CとDの倍数
CD=C*D//math.gcd(C, D)
if A % CD ==0:
    CD_start = A // CD
else:
    CD_start = (A//CD)+1

CD_end = B//CD
CD_count =-CD_start+CD_end+1

count = (B-A+1)-(C_count +D_count -CD_count)
print(count)

### FIXED CODE ###

A,B,C,D  = map(int, input().split())

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

#Cの倍数
if A % C ==0:
    C_start = A // C
else:
    C_start = (A//C)+1

C_end = B//C
C_count =-C_start+C_end+1

#Dの倍数
if A % D ==0:
    D_start = A // D
else:
    D_start = (A//D)+1

D_end = B//D
D_count =-D_start+D_end+1

#CとDの倍数
CD=C*D//gcd(C, D)
if A % CD ==0:
    CD_start = A // CD
else:
    CD_start = (A//CD)+1

CD_end = B//CD
CD_count =-CD_start+CD_end+1

count = (B-A+1)-(C_count +D_count -CD_count)
print(count)
#coding: utf-8

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

if B%A == 0:
    print(A + B)
else:
    print(B - A)


### FIXED CODE ###

#coding: utf-8

#A = int(input())
#B = int(input())
A, B = map(int, input().split())


if B%A == 0:
    print(A + B)
else:
    print(B - A)
n, k = map(int,input().split())
p = list(input())
a = []
ape = 1
for i in range(1,n):
     if p[i-1] != p[i]:
          a.append(ape)
          ape = 1
     else:
          ape += 1
a.append(ape)

if (p[0] == '1') or (len(a) == 1):
     kaisi = 0
else:
     kaisi = 1

ans = 0
anslist = []

for i in range(kaisi,min(2*k+1+kaisi,len(a))):
     ans += a[i]
anslist.append(ans)

for i in range(kaisi+2,len(a),2):
     if i+2*k <= len(a)-1:
          ans = ans-a[i-2]-a[i-1]+a[i+2*k]+a[i+2*k-1]
          anslist.append(ans)
     else:
          break
ans = 0
if kaisi != 0 and k != 0:
     for i in range(0,2*k):
          ans += a[i]
     anslist.append(ans)

print(max(anslist))

### FIXED CODE ###

#参考　https://atcoder.jp/contests/abc124/submissions/4948803
from itertools import accumulate

n, k = map(int,input().split())
p = list(input())
a = []
pre = '1'
cnt = 0
for i in range(n):
     if pre != p[i]:
          a.append(cnt)
          cnt = 1
          pre = p[i]
     else:
          cnt += 1
a.append(cnt)
if pre == '0':
     a.append(0)

w = 2*k+1

if w >= len(a):
     print(n)
else:
     acc = list(accumulate(a))
     ans = 0
     acc = [0] + acc
     for i in range(0,len(a)-w+1,2):
          ans = max(ans,acc[i+w]-acc[i])
     print(ans)
n = int(input)
count = 0
ans = 'No'
for _ in range(n):
	a , b = map(int,input().split(' '))
    if a!=b:
    	count = 0 
    else:
    	count += 1
    if count == 3:
    	ans = 'Yes'
print(ans)        


### FIXED CODE ###

n = int(input())
count = 0
ans = 'No'
for i in range(n):
    a , b = map(int,input().split(' '))
    if a!=b:
        count = 0 
    else:
        count += 1
    if count == 3:
        ans = 'Yes'
print(ans)
import math

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

left = int(a) + int(b)
right = int(c)

a = math.sqrt(int(a))
b = math.sqrt(int(b))
#c = math.sqrt(int(c))

left = left + 2*a*b


ans = ""

if(left< right):
    ans = "Yes"
else:
    ans = "No"

print(ans)

### FIXED CODE ###

Term = [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())
print(Term[K-1])
a=''
for i in input():
    if i=='B':
        a=a[:-1]
    else:
        a+=x
print(a)

### FIXED CODE ###

a=''
for i in input():
    if i=='B':
        a=a[:-1]
    else:
        a+=i
print(a)
s = raw_input()
k = int(raw_input())


s_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']

def s_i(st):
    return ord(st) - 96

j = 0
while k > 0:
    a = s_i(s[j])
    if s[j] == 'a' and j < len(s)-1:
        pass
    elif 27 - a <= k:
        k = k - (27 - a)
        s = s[:j] + 'a' + s[j+1:]
    elif j == len(s) - 1:
        t = (a+k)%26 - 1
        if t >= 0:
            s = s[:j] + s_l[t]
        else:
            s = s[:j] + s_l[t + 26]
        break
    else:
        pass
    j += 1

print s

### FIXED CODE ###

s = raw_input()
k = int(raw_input())


s_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']

def s_i(st):
    for i in range(26):
        if st == s_l[i]:
            return i + 1
            break

j = 0
while k > 0 and j <= len(s)-1:
    a = s_i(s[j])
    if s[j] == 'a' and j < len(s)-1:
        pass
    elif 27 - a <= k and j < len(s)-1:
        k = k - (27 - a)
        s = s[:j] + 'a' + s[j+1:]
    elif j == len(s) - 1:
        t = (a+k)%26 - 1
        if t >= 0:
            s = s[:j] + s_l[t]
        else:
            s = s[:j] + s_l[t + 26]
        break
    else:
        pass
    j += 1

print s
from functools import reduce
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a


#最小公倍数
def lcm(a,b):
  return a * b//gcd(a,b) a


if __name__ == "__main__":
    n = int(input())
    lst = []
    for i in range(n):
        lst.append(int(input()))
    print(reduce(lcm,lst))





### FIXED CODE ###

from functools import reduce
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a


#最小公倍数
def lcm(a,b):
  return b//gcd(a,b) * a


if __name__ == "__main__":
    n = int(input())
    lst = []
    for i in range(n):
        lst.append(int(input()))
    print(reduce(lcm,lst))
n,m=[int(i) for i in input().split()]
list=[int(i) for i in input().split()]
x=1/(4*m)
count=0
for i in range(1,n+1):
  if list[i]>=x:
    count+=1

if count>=m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n,m=[int(i) for i in input().split()]
list=[int(i) for i in input().split()]
x=1/(4*m)
y=sum(list)
count=0
for i in range(1,n+1):
  if list[i-1]>=x*y:
    count+=1

if count>=m:
  print('Yes')
else:
  print('No')
N= int(input())
E = [input().split()[2:] for _ in [0]*N]
Q = [0]
L = [0] + [-1]*N
def func(ide):
    for i in E[ide]:
        i = int(i) - 1
        if L[i] < 0 :L[i] = L[ide] +1 ; Q+= [i]


while Q:top = Q.pop(0);func(top)

for i in range(N):print(i + 1 ,int(L[i]))



### FIXED CODE ###

N= int(input())
E = [input().split()[2:] for _ in range(N)]
Q = [0]
L = [0] + [-1]*N
frag = [1] + [0]*N
def func(ide):
    global Q
    for i in E[ide]:
        i = int(i) - 1
        if frag[i] != 1:frag[i] = 1;L[i] = L[ide] +1 ;Q.append(i)
        
    

while Q:top = Q[0];func(top);del Q[0]

for i in range(N):print(i + 1 ,int(L[i]))
k,n = map(int,input().spliut())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)

### FIXED CODE ###

k,n = map(int,input().split())
a = list(map(int,input().split()))
ans = a[0]+(k-a[-1])
for i in range(n-1):
    ans = max(ans,a[i+1]-a[i])
print(k-ans)
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
count = 0
i = 1
while d <= x:
    d = d + l[i - 1]
    count += 1
    if i <= n - 1
        i += 1

print(count)

### FIXED CODE ###

import itertools
import math
n, x = map(int, input().split())
l = list(map(int, input().split()))

d = 0
count = 0
i = 1
while d <= x and i <= n:
    d = d + l[i - 1]
    count += 1
    i += 1
if d <= x:
    count += 1

print(count)
N = int(input())
c= list(input()) 
if c.count('R') == N:
	print(0)
	exit()
div=0
addcnt = 0
if N %2 == 1:
	div =1
	Q = c[int(N/2)]
	# print(Q)
	if Q == 'W':
		addcnt +=1
		# print('QQQ!')
clist_L = c[:int(N/2)]
clist_R = c[int(N/2)+div:]
Lcnt = clist_L.count('W')
Rcnt = clist_R.count('R')
if Lcnt - Rcnt <=0:
	print(Rcnt-addcnt)
else:
	print(Lcnt-Rcnt+addcnt)

### FIXED CODE ###

s = int(input())


if s >= 30:
	print('Yes')
else:
	print('No')
N = int(input())
l = list()

for i in range(N):
  n = int(input())
  l.append(n)
 
m = max(l)
SUM = sum(l) - m
 
if m > SUM:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N = int(input())
l = list(map(int, input().split()))

m = max(l)
SUM = sum(l) - m

if m < SUM:
  print('Yes')
else:
  print('No')
s,t = input().split()
if t[:len(t)-1] == s:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = input()
t = input()
if t[:len(t)-1] == s:
    print('Yes')
else:
    print('No')
3 4 10 40

### FIXED CODE ###

import math
a,b,h,m = map(int,input().split())
N = 360*m/60
M = 30*h + 30*m/60
siita = abs(N - M)
if siita >= 180:
  siita = 360 - siita
ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians((siita))))
print(ans)
A,B,C = map(int,input.split)
print(C-A+B)

### FIXED CODE ###

A,B,C = map(int,input().split())
X = C - A + B
if X < 0:
    X = 0
print(X)
from bisect import bisect_left
N, Q = map(int, input().split())
consts = []
for _ in range(N):
    s,t,x = map(int, input().split())
    consts.append((x,s,t))
const.sort()
D=[int(input()) for _ in range(Q)]
ans=[-1]*Q
jump=[-1]*Q
for x,s,t in consts:
     left=bisect_left(D,s-x)
     right=bisect_left(D,t-x)
     while left<right:
         if jump[left]==-1:
             ans[left]=x
             jump[left]=right
             left += 1
         else:
             left=jump[left]
print(*ans, sep='\n')

### FIXED CODE ###

from bisect import bisect_left
N, Q = map(int, input().split())
consts = []
for _ in range(N):
    s,t,x = map(int, input().split())
    consts.append((x,s,t))
consts.sort()
D=[int(input()) for _ in range(Q)]
ans=[-1]*Q
jump=[-1]*Q
for x,s,t in consts:
    left=bisect_left(D,s-x)
    right=bisect_left(D,t-x)
    while left<right:
        if jump[left]==-1:
            ans[left]=x
            jump[left]=right
            left += 1
        else:
            left=jump[left]
print(*ans, sep='\n')
N,A,B=map(int,input().split())
d=B-A
if d%2==:print("Alice")
else:print("Borys")

### FIXED CODE ###

N,A,B=map(int,input().split())
d=B-A
if d%2==0:print("Alice")
else:print("Borys")
>>> a,b,c=map(int,input().split())
if a<c and c<b:
	print("Yes")
elif b<c and c<a:
	print("Yes")
else:
	print("No")


### FIXED CODE ###

a,b,c=map(int,input().split())
if a<b:
	if a<c and c<b:
		print("Yes")
	else:
		print("No")
elif b<a:
	if b<c and c<a:
		 print("Yes")
	else:
		 print("No")
else:
	 print("No")
a,b=map(int,input().split())

goukei=0
for i in range(a):
    aN,bN=map(int,input().split())
    goukei=bN+goukei
    if goukei>b:
        owari=aN
        break
    else:
        pass

print(owari)

### FIXED CODE ###

a,b=map(int,input().split())
alllist=[]
goukei=1
for i in range(a):
    tmplist=list(map(int,input().split()))
    alllist.append(tmplist)

alllist2=sorted(alllist)
for i in range(a):
    goukei=alllist2[i][1]+goukei
    if goukei>b:
        owari=alllist2[i][0]
        break
    else:
        pass

print(owari)
import fractions
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
ans = lcm_list(T)

print(ans)

### FIXED CODE ###

#import math  
import fractions
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
ans = lcm_list(T)

print(ans)
N, A, B = [int(i) for i in input().split()]
    ans = []
    if (B-A)%2 == 0:
        print(int(int(B-A)/2))
    else:
        print(int((B-A)//2+1+min([A-1,N-B])))

### FIXED CODE ###

N, A, B = [int(i) for i in input().split()]
ans = []
if (B-A)%2 == 0:
    print(int((B-A)//2))
else:
    print(int((B-A)//2+1+min([A-1,N-B])))
O = input()
E = input()

l = min(len(O), len(E))
s = ""
for i in range(l):
  s = s + O[i] + E[i]

if len(0) > len(E):
  s = s + O[len(O)]

print(s)

### FIXED CODE ###

O = input()
E = input()

L = []
for i in range(len(O)):
  L.append(O[i])
  L.append("")

for j in range(len(E)):
  L[2*j+1] = E[j]

l = ""
for i in range(len(L)):
  l = l + L[i]

print(l)
import random
val = input('Enter your name: ')
 
if len(val)<=3:
  val = input('Enter your name: ')
elif len(val)>=20:
  val = input('Enter your name: ')
 
else:
 print(len(val))
 t = random.randint(0,len(val)-3)
 print(val[t:t+3])

### FIXED CODE ###

val = input()
print(val[0:3])
s=input()
k=int(input())
if s[0]=="1":
  try:
    if s[k-1]=="1":
      print('1')
    else:
      print(s[s.rfind("1")+1])
  except IndexError:
    print(s[s.rfind("1")+1])
else:
  print(s[0])


### FIXED CODE ###

s=input()
k=int(input())

for i in range(k):
  if s[i]!="1":
    break
print(s[i])
a = input()
b = input()
sumA = ""
sumB = ""
for i in range(int(b)):
    sumA +=""+str(a)
for i in range(int(a)):
    sumB +=""+str(b)
if(int(sumA)>int(sumB)):
    print(sumA)
elif(int(sumB)>int(sumA)):
    print(sumB)
elif(int(sumA) == int(sumB)):
    print(sumA)

### FIXED CODE ###

a, b = input().split()
aa = ""
bb = ""
for i in range(0, int(b)):
    aa += a
for j in range(0, int(a)):
    bb += b

if (int(a)>int(b)):
    print(bb)
else:
    print(aa)