Harryxun/stf_run huggingface dataset:
n,k = map(int,input().split())
p = list(map(int,input().split()))
 
e = []
 
for i in range(len(p)):
	e.append((1 + p[i]) / 2)

tmp = 0
l = 0
 
while True:
  res = 0
  j = 0
  for j in range(k):
    res = res + e[l + j]
  if tmp < res:
    tmp = res
  l = l + 1
  if l + k > len(e):
    break

print(tmp)

### FIXED CODE ###

s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())

if u == s:
  a = a - 1
elif u == t:
  b = b - 1

print(str(a) + ' ' + str(b))
i = int(input().split(' '))
if i[0]<10 and i[1]<10:
	print(i[0]*i[1])
else:
	print(-1)

### FIXED CODE ###

j=input()
i = j.split(' ')
k = []
for c in i:
    k.append(int(c))
if k[0]<10 and k[1]<10:
	print(k[0]*k[1])
else:
	print(-1)
def main():
    num, yen_sum = map(int, input().split())
    yen_sum /=1000
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        if bill_10000*10 + (num-bill_10000+1)*5 <= yen_sum:
            continue
        for bill_5000 in range(num-bill_10000+1):
            bill_1000 = num - bill_10000 - bill_5000
            if bill_10000*10 + bill_5000*5 + bill_1000*1 == yen_sum:
                res = [bill_10000, bill_5000, bill_1000]
                break
    print(*res)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    S = input()
    S = S.replace('2017','2018')
    print(S)


if __name__ == '__main__':
    main()
N,Y = map(int,input().split())
exist_flag = False
exist_flag = False
for i in range(N+1):
    for j in range(N+1-i):
        if Y == 10000*i + 5000*j + 1000*(N-i-j):
            exist_flag = True
            break
    if exist_flag:
        break
if not exist_flag:
    i,j,k = -1, -1, -1
print(i, j, k)

### FIXED CODE ###

N,Y = map(int,input().split())
exist_flag = False
for i in range(N+1):
    for j in range(N+1-i):
        if Y == 10000*i + 5000*j + 1000*(N-i-j):
            exist_flag = True
            break
    if exist_flag:
        break
if not exist_flag:
    print(-1, -1, -1)
else:
    print(i, j, N-i-j)
import sys

stdin = sys.stdin
na = lambda: map(int, stdin.readline().split())

def main():
  N, Q = na()

  ab = []
  for _ in range(N-1):
    a, b = na()
    ab.append([a, b])
  ab.sort()

  counter = [0] * (N+1)
  for _ in range(Q):
    p, x = na()
    counter[p] += x
  for i in range(N - 1):
    counter[ab[i][1]] += counter[ab[i][0]]
  print(*counter[1:])

if __name__ == "__main__":
  main()


### FIXED CODE ###

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

if N >= 3200:
  print(S)
else:
  print("red")
n=int(input())

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

ki=[0]*100001
gu=[0]*100001

for i in range(n):
    if i%2==0:
        ki[l[i]]+=1
    else:
        gu[l[i]]+=1
km1=[max(ki),ki.index(max(ki))]
km2=[sorted(ki)[-2],ki.index(sorted(ki)[-2])]
gm1=[max(gu),gu.index(max(gu))]
gm2=[sorted(gu)[-2],gu.index(sorted(gu)[-2])]

if km1[1]!=gm1[1]:
    print(n-km1[0]-gm[0])
else:
    if km1[1]-km2[1]>=gm1[1]-gm2[1]:
        print(n-km1[0]-gm2[0])
    else:
        print(n-gm1[0]-km2[0])



### FIXED CODE ###

n=int(input())

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

ki=[0]*100001
gu=[0]*100001

for i in range(n):
    if i%2==0:
        ki[l[i]]+=1
    else:
        gu[l[i]]+=1
km1=[max(ki),ki.index(max(ki))]
km2=[sorted(ki)[-2],ki.index(sorted(ki)[-2])]
gm1=[max(gu),gu.index(max(gu))]
gm2=[sorted(gu)[-2],gu.index(sorted(gu)[-2])]

if km1[1]!=gm1[1]:
    print(n-km1[0]-gm1[0])
else:
    if km1[0]-km2[0]>=gm1[0]-gm2[0]:
        print(n-km1[0]-gm2[0])
    else:
        print(n-gm1[0]-km2[0])
n = int(input())
List = [input() for i in range(n)]

c = {}
res = []

for i in range(n):
    if List[i] in c.keys():
        c[List[i]] += 1
    else:
        c[List[i]] = 1

ac = c.most_common() ##これが無いとACにならない！！！！
                     ##毎回の計算がかなりの時間ロスだった
res.append(ac[0][0])
for i in range(1, leng):
    if ac[i][1] >= ac[i-1][1]:
        res.append(ac[i][0])
    else:
        break

#res = sorted(res)
res.sort()
for j in range(len(res)):
    print(res[j])

### FIXED CODE ###

import collections

n = int(input())
List = [input() for i in range(n)]
res = []

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])
s = input()
d = len(s)//2
print("Yes" if s[:d] == s[d+1:] "No" else)

### FIXED CODE ###

n, m = map(int, input().split())
print(n*(n-1)//2 + m*(m-1)//2)
N, K = map(int, input().split())
H = list(map(int, input().split()))
H.sort(reverse=True)
if K <= N:
    for k in range(K):
        H.remove(H[k])
else:
    H.clear()
print(sum(H))

### FIXED CODE ###

N, K = map(int, input().split())
H = list(map(int, input().split()))
H.sort()
if K == 0:
    pass
elif K > N:
    H.clear()
else:
    H = H[:-K]
print(sum(H))
# coding: utf-8
import math
N,M=map(int,input().split())
A=[]
for i in range(1,int(math.sqrt(M))):
    if M%i==0:
        if M//i>=N:
            A.append(i)
            if i>=N and M//i>i:
                A.append(M//i)

A.sort()

print(A[-1])

### FIXED CODE ###

# coding: utf-8
import math
N,M=map(int,input().split())
A=[]
for i in range(1,int(math.sqrt(M))+1):
    if M%i==0:
        if M//i>=N:
            A.append(i)
            if i>=N and M//i>i:
                A.append(M//i)

A.sort()

ans=A[-1]

print(ans)
n,t = map(int,input().split())
data=[]

for i in range(n):
    data.append(list(map(int,input().split())))
    
data.sort(key=lambda x:x[1])

pos = 0
for i in range(len(data)):
    if data[i][1] >t:
        pos = i-1
        
if pos==-1:
    print('TLE')
else:
    new = data[:pos]
    new.sort(key=lambda x:x[0])
    print(new[0][0])

### FIXED CODE ###

n,t = map(int,input().split())
data=[]

for i in range(n):
    data.append(list(map(int,input().split())))
    
data.sort(key=lambda x:x[1])

pos = len(data)
for i in range(len(data)):
    if data[i][1] >t:
        pos = i
        break
        
if pos==0:
    print('TLE')
else:
    new = data[:pos]
    new.sort(key=lambda x:x[0])
    print(new[0][0])
# -*- coding: utf-8 -*-
import numpy as np
import math

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

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))

### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
import math
 
N, M = map(int, input().split())
 
def comb(n, r):
    if n < r:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
print(comb(N, 2)+comb(M, 2))
a=input().split()

c=a[1]%a[0]
d=b[1]//a[0]
d=d-1
if c!=0:
    d+=1

print(d)

### FIXED CODE ###

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

for n in range(0,20):
    if n*(a-1)>=b-1:
        break

print(n)
happy,newyear,enjoy

### FIXED CODE ###

print(input().replace(',', ' '))
import numpy as np

A, B = map(int, input().split())
gcd = np.gcd(A, B)
result = 1
d = 2
while d * d <= gcd:
    e = 0
    while gcd % d == 0:
        gcd //= d
        e += 1
    if e > 0:
        result += 1
    d += 1
if gcd > 1:
    result += 1
print(result)

### FIXED CODE ###

def gcd(x, y):
    while y != 0:
        r = x % y
        x = y
        y = r
    return x

A, B = map(int, input().split())
gcd = gcd(A, B)
result = 1
d = 2
while d * d <= gcd:
    e = 0
    while gcd % d == 0:
        gcd //= d
        e += 1
    if e > 0:
        result += 1
    d += 1
if gcd > 1:
    result += 1
print(result)
def CountingSort(A,B,num):

	C = [0 for _ in range(num)]

	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	k = max(A)
	for j in range(k+1):
		C[j] += C[j-1]

	for h in range(k+1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num)]
	CountingSort(A,B,num)

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



### FIXED CODE ###

def CountingSort(A,B,num):

	k = max(A)
	C = [0 for _ in range(k+1)]
	#C[i]にiの出現回数を記録する
	for i in A:
		C[i] += 1

	#C[i]にi以下の数の出現数を記録する =>累積度数分布を出力
	for j in range(1,k+1):
		C[j] += C[j-1]
	for h in range(num-1,-1,-1):
		B[C[A[h]]-1] = A[h]
		C[A[h]] -= 1

if __name__ == '__main__':

	num = int(input())
	A = [int(i) for i in input().split()]

	B = [0 for _ in range(num+1)]
	CountingSort(A,B,num)

	B.pop()
	print(" ".join(map(str,B)))
if N[0] == "7":
    print("Yes")
elif N[1] == "7":
    print("Yes")
elif N[2] == "7":
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N = input()
if N[0] == "7":
    print("Yes")
elif N[1] == "7":
    print("Yes")
elif N[2] == "7":
    print("Yes")
else:
    print("No")
h, w = map(int, input().split())
n = int(input())
a = list(map(int, input().split()))
a = [None] + a

ans = [[None] * w for _ in range(h)]

cur = 1
way = 1
r, c = 0, 0
flg = True
while cur <= n:
    ans[r][c] = cur
    a[cur] -= 1
    if a[cur] == 0:
        cur += 1
    if (c == 0 or c == w - 1) and (not flg):
        r += 1
        way *= -1
        flg = True
    else:
        c += way
        flg = False
    # print(r, c)

for aa in ans:
    print(' '.join(map(str, aa)))


### FIXED CODE ###

h, w = map(int, input().split())
n = int(input())
a = list(map(int, input().split()))
a = [None] + a

ans = [[None] * w for _ in range(h)]

cur = 1
way = 1
r, c = 0, 0
flg = True
while cur <= n:
    ans[r][c] = cur
    a[cur] -= 1
    if a[cur] == 0:
        cur += 1

    if (w == 1) or ((c == 0 or c == w - 1) and (not flg)):
        r += 1
        way *= -1
        flg = True
    else:
        c += way
        flg = False
    # print(r, c)

for aa in ans:
    print(*aa)
import sys

for line in sys.stdin.readlines():
  line = line.strip()
  H, W = map(int, line.split())
  if H == 0 and W == 0:
    break
  else:
    for i in xrange(H):
      if i % 2 == 0:
        print "".join([x%2?"#":"." for x in xrange(W)])
      else:
        print "".join([x%2?".":"#" for x in xrange(W)])
    else:
      print

### FIXED CODE ###

import sys

for line in sys.stdin.readlines():
  line = line.strip()
  H, W = map(int, line.split())
  if H == 0 and W == 0:
    break
  else:
    for i in xrange(H):
      if i % 2 == 0:
        print "".join(["#" if x %2 == 0 else "." for x in xrange(W)])
      else:
        print "".join(["." if x % 2 == 0 else "#" for x in xrange(W)])
    else:
      print
print(input().conut("2"))

### FIXED CODE ###

print(input().count("2"))
"""memo
    numpyでやるときは配列を一気に更新するが(numpy使いたくないのでやらない)，
    このやり方は後ろの方から更新することで後の更新に影響を与えない(考え方すごい)．
    (参考#9889377)
"""

import sys
input = sys.stdin.readline

def main():
    #1:初期化
    N,W = map(int,input().split())
    dp = [0]*(W+1)

    #2:初期値(元からゼロなので記述無し)

    #3:dp実行部(貰うDP)
    for i in range(N):
        w, v = map(int,input().split())
        for i in range(W, w-1, -1):
            tmp = dp[i-w] + v
            if dp[i] < tmp:
                dp[i] = tmp
        #print(dp,sep="\n")

    #4:出力
    print(max(dp))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    #1:初期化
    N,W = map(int,input().split())
    dp = [W+1]*(N*10**3+1)

    #2:初期値
    dp[0] = 0

    #3:dp実行部(貰うDP)
    for i in range(N):
        w, v = map(int,input().split())
        for i in range(N*10**3, v-1, -1):
            tmp = dp[i-v] + w
            if dp[i] > tmp:
                dp[i] = tmp
        #print(dp,sep="\n")

    #4:出力
    output = 0
    for i in range(N*10**3+1):
        if dp[i] <= W:
            output = i
    print(output)

if __name__ == '__main__':
    main()
import sys
def inpl(): return list(map(int, sys.stdin.readline().split()))
N, K = map(int, sys.stdin.readline().split())
A = inpl()
dic = {}
for i in range(N):
    dic[i+1] = A[i]
i = 1
visit = [1]
while dic[i] not in visit:
    visit.append(dic[i])
    i = dic[i]
find = visit.index(dic[i])
visit = visit[find:]
length = len(visit) - find
K = (K-find)%length
print(visit[K])

### FIXED CODE ###

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
i = 0
visit = []
visit_set = set()
while i not in visit_set:
    visit.append(i)
    visit_set.add(i)
    i = A[i] - 1
find = visit.index(i)
if K < find:
    print(visit[K] + 1)
else:
    root = visit[find:]
    K = (K-find) % len(root)
    print(root[K] + 1)
W,H,x,y,r=map(int,input().split())
if 0 < x + r < W and r < x:
  if 0 < y + r < H:
    print("Yes")
  else:
    Print("No")
else:
  print("No")

### FIXED CODE ###

W,H,x,y,r=map(int,input().split())
if r <= x and r <= y and x+r <= W and y+r <= H:
  print("Yes")
else:
  print("No")
a=int(input())
b=int(input())
num=a*b 
print(num)

### FIXED CODE ###

lst=[int (x) for x in input().split(' ')]
print(lst[0]*lst[1])
import math

k = int(input())
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            m = math.gcd(i,j)
            ans += math.gcd(m,l)

print(ans)

### FIXED CODE ###

import math

k = int(input())
ans = 0
m = 0
for a in range(1,k+1):
    for b in range(a+1,k+1):
        for c in range(b+1, k+1):
            m = math.gcd(a,b)
            ans += 6*math.gcd(m,c)
for a in range(1,k+1):
    for c in range(a+1,k+1):
        ans += 3*math.gcd(a,c)
for c in range(1,k+1):
    for a in range(c+1,k+1):
        ans += 3*math.gcd(a,c)
for a in range(1,k+1):
    ans += a
print(ans)
def is_prime(int x):
  if x <= 1: return false
  int i=2
  while i*i <= x:
    if x%i: return False
    i+=1
  return True

X=int(input())
while is_prime(X):
  X+=1
print(X)

### FIXED CODE ###

def is_prime(x):
  if x <= 1: return false
  i=2
  while i*i <= x:
    if not x%i: return False
    i+=1
  return True
 
X=int(input())
while not is_prime(X):
  X+=1
print(X)
a,b=map(int,input().split())

if a<9&&b<9:
	print('Yay!')
else:
    print(':(') 

### FIXED CODE ###

a,b=map(int,input().split())
if a<=8 and b<=8:
  print('Yay!')
else:
  print(':(')
"\n".join(sorted([input() for i in range(10)])[:-3:-1])

### FIXED CODE ###

print "\n".join([str(x) for x in (sorted([input() for i in range(10)])[:-4:-1])])
A , B = map ( int , input ( )  . split( ) )
 
if (A , B) <= 9 :
print ( A * B )
 
else:
print ( -1 )

### FIXED CODE ###

A , B = map ( int , input ( )  . split( ) )
 
if ( A<= 9 and B <= 9) :
    print ( A * B )
else:
    print ( -1 )
a=int(input())
b=int(input())
x=[1,2,3]
print(x.remove(a,b))

### FIXED CODE ###

a=int(input())
b=int(input())
x=[1,2,3]
x.remove(a)
x.remove(b)
print(x[0])
import math
a,b = list(map(int,input().split()))
print(int((a*b)/math.gcd(a,b)))

### FIXED CODE ###

def hcf(a,b):
	if(a==0):
		return b
	if(b==0):
		return a
	return hcf(b%a,a)
import math
a,b = list(map(int,input().split()))
print(abs(a*b)//hcf(a,b))
n,m = map(int,input().split())
li = [int(input()) for i in range(m)]
p = 1000000007
ans = 0

steps = [0]*(n+1)
steps[1] = 1
steps[2] = 2
for i in range(3,n+1):
  steps[i] = (steps[i-1] + steps[i-2])%p

if li[0] == 1:
  ans += 1
else:
  ans += steps[li[0]-1]%p

for i in range(m-1):
  if li[i+1] == li[i]:
    continue
  elif li[i+1] - li[i] == 1:
    ans = 0
  elif li[i+1] - li[i] == 2:
    continue
  else:
    ans *= steps[li[i+1]-li[i]-2]
    ans %= p

if li[m-1] == n-1: 
  print(ans)
else:
  print((ans*steps[n-li[m-1]-1])%p)

### FIXED CODE ###

n,m = map(int,input().split())
li = [int(input()) for i in range(m)]
p = 1000000007
ans = 0

steps = [0]*(max(10,n+1))
steps[1] = 1
steps[2] = 2
for i in range(3,n+1):
  steps[i] = (steps[i-1] + steps[i-2])%p
if m == 0:
  print(steps[n])
else:
  if li[0] == 1:
    ans += 1
  else:
    ans += steps[li[0]-1]%p

  for i in range(m-1):
    if li[i+1] == li[i]:
      continue
    elif li[i+1] - li[i] == 1:
      ans = 0
    elif li[i+1] - li[i] == 2:
      continue
    else:
      ans *= steps[li[i+1]-li[i]-2]
      ans %= p

  if li[m-1] == n-1: 
    print(ans)
  else:
    print((ans*steps[n-li[m-1]-1])%p)
5 4 2 4 1

### FIXED CODE ###

W,H,x,y,r=[int(i) for i in input().split()]
if x < 0 or y < 0:
	print("No")
elif (x+r) > W:
	print("No")
elif (y+r) > H:
	print("No")
else:
	print("Yes")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator, math
from bisect import *

N, x = map(int, input().split())
X = [int(x) for x in input().split()]

def f():
    X.sort()
    L = len(X)
    if L == 1:
        return abs(X[0] - L)
    
    i = bisect_left(X, x)
    
    d = [t - u for t,u in zip(X[1:], X[:-1])]
    s = None
    if i == 0:
        s = set(d)
        s.add(x[0] - x)
    elif i == len(X):
        s = set(d)
        s.add(x - X[-1])
    else:
        s = set(d[:i - 1])
        s.update(d[i+1:])
        s.update({x - X[i-1], X[i] - x})
    return reduce(lambda a,x: math.gcd(a, x), s)

print(f())

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator, fractions
from bisect import *

N, x = map(int, input().split())
X = [int(x) for x in input().split()]

def f():
    X.sort()
    L = len(X)
    if L == 1:
        return abs(X[0] - x)
    
    i = bisect_left(X, x)
    
    d = [t - u for t,u in zip(X[1:], X[:-1])]
    s = None
    if i == 0:
        s = set(d)
        s.add(x[0] - x)
    elif i == len(X):
        s = set(d)
        s.add(x - X[-1])
    else:
        s = set(d[:i - 1])
        s.update(d[i+1:])
        s.update({x - X[i-1], X[i] - x})
    return reduce(fractions.gcd, s)

print(f())
N, K, X, Y = map(int, input().split())

print(X * K + (N - K) * Y)

### FIXED CODE ###

n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n > k:
    print(x * k + (n - k) * y)
else:
    print(n * x)
while True:
    e = int(raw_input())
 
    if e == 0:
        break

    ans = float('inf')

    for z in range(10**2+1):
        for y in range(10**3+1):
            if y**2 + z**3 <= e:
                x = e - y**2 - z**3
                ans = min(ans, x+y+z)

    print ans



### FIXED CODE ###

#!/usr/bin/env python3

from math import sqrt

while True:
    e = int(input())

    if e == 0: break
    z, ans = 0, e

    while z ** 3 <= e:
        y = int(sqrt(e - z**3))
        x = e - y**2 - z**3
        ans = min(ans, x + y + z)
        z += 1

    print(ans)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def dfs(s,Map,H,W,c):
    dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)]
    for i in range(len(dxdy)):
        Map[s[0]][s[1]] = c
        nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1])
        if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nextPos[1] < W:
            if Map[nextPos[0]][nextPos[1]] == 1:
                dfs(nextPos,Map,H,W,c)

while True:
    W,H = map(int,input().split(" "))
    if W == 0 and H == 0:
        break
    Map = [list(map(int,input().split())) for i in range(0,H)]
    c = 1
    for i in range(H):
        for j in range(W):
            if Map[i][j] == 1:
                c += 1
                dfs((i,j),Map,H,W,c)
    print(c-1)

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)

def dfs(s,Map,H,W,c):
    dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)]
    for i in range(len(dxdy)):
        Map[s[0]][s[1]] = c
        nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1])
        if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nextPos[1] < W:
            if Map[nextPos[0]][nextPos[1]] == 1:
                dfs(nextPos,Map,H,W,c)

while True:
    W,H = map(int,input().split(" "))
    if W == 0 and H == 0:
        break
    Map = [list(map(int,input().split())) for i in range(0,H)]
    c = 1
    for i in range(H):
        for j in range(W):
            if Map[i][j] == 1:
                c += 1
                dfs((i,j),Map,H,W,c)
    print(c-1)
x = input()
if x == 'A':
	print('T')
elif x == 'T':
	print('A')
elif X == 'C':
	print('G')
else:
	print('C')

### FIXED CODE ###

x = input()
if x == 'A':
	print('T')
elif x == 'T':
	print('A')
elif x == 'C':
	print('G')
else:
	print('C')
import sys as chokudairedcoderatcoderowner
A,B,C = map(int,chokudairedcoderatcoderowner.stdin.readline().split())

if A == B:
  print(C)
else if A == C:
  print(B)
else:
  print(A)

### FIXED CODE ###

import sys as cghavcjhcbejwcbbsmbcjsdbcjdcadhbcjbdsjjcdjabjadbjsbcjdsbcsbcnsbcdnbcmbcmdabcdbjwhckfmknvskndleccdajbubcrjhebuoqbjhbjcdnaaayruegfubefruebhvy38bjhbvvbhcba
A,B,C = map(int,cghavcjhcbejwcbbsmbcjsdbcjdcadhbcjbdsjjcdjabjadbjsbcjdsbcsbcnsbcdnbcmbcmdabcdbjwhckfmknvskndleccdajbubcrjhebuoqbjhbjcdnaaayruegfubefruebhvy38bjhbvvbhcba.stdin.readline().split())

if A == B:
  print(C)
elif A == C:
  print(B)
else:
  print(A)
import math

n,_,*a=map(int,open(0).read().split())
match={1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
a=sorted(a)

num=[0]*8

for d in a:
    num[match[d]]=d

dig=set(num)
dig.remove(0)
dig=sorted(list(dig),reverse=True)

dp=[-10**10]*(n+1)
dp[0]=0

for i in range(n+1):
    for d in dig:
        if i-match[d]<0:
            continue

        dp[i]=max(dp[i],dp[i-match[d]]+1)

ans=''

i=n
while i>0:
    for d in dig:
        if dp[i]==dp[i-match[d]]+1:
            ans=ans+str(d)
            break
    
    i-=match[d]

print(ans)

### FIXED CODE ###

import math

n,_,*a=map(int,open(0).read().split())
match={1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
a=sorted(a)

num=[0]*8

for d in a:
    num[match[d]]=d

dig=set(num)
dig.remove(0)
dig=sorted(list(dig),reverse=True)

dp=[-10**10]*(n+1)
dp[0]=0

for i in range(n+1):
    for d in dig:
        if i-match[d]<0:
            continue

        dp[i]=max(dp[i],dp[i-match[d]]+1)

ans=''

i=n
while i>0:
    for d in dig:
        if i-match[d]<0:
            continue
        if dp[i]==dp[i-match[d]]+1:
            ans=ans+str(d)
            break
    
    i-=match[d]

print(ans)
ans = 0
for i in range(N):
    j = N // i
    ans += i * j * (j+1) / 2

print(ans)


### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N+1):
    j = N // i
    ans += i * j * (j+1) // 2

print(ans)
import fractions as frac
n = int(input())
t = []
for i in range(n):
  t.append(int(input()))
tmp = t[0]
for i in range(1,n):
  if tmp % t[i] != 0:
    tmp = int(tmp * t[i] /frac.gcd(tmp,t[i]))
print(tmp)

### FIXED CODE ###

import math
n = int(input())
t = []
for i in range(n):
    t.append(int(input()))
if n == 1:
    print(t[0])
else:
    tmp = t[0]
    for i in range(1,n):
        div = math.gcd(tmp,t[i])
        tmp = (t[i] * tmp)//div
    print(tmp)
ch = input("Enter a character: ")

if(ch=='A' or ch=='a' or ch=='E' or ch =='e' or ch=='I'
 or ch=='i' or ch=='O' or ch=='o' or ch=='U' or ch=='u'):
    print(ch, "is a Vowel")
else:
    print(ch, "is a Consonant")

### FIXED CODE ###

letter = input()
vowels = ['a' , 'e' , 'o' , 'u' , 'i' ]

if letter in vowels:
    print ("vowel")
else:
    print ("consonant")
import sys

sys.setrecursionlimit(10000000)

n,k=[int(i) for i in input().split()]
modnum=1000000007
Cnklist=[None for i in range(2001)]
def Cnk(i):
    global modnum
    if Cnklist[i]!=None:
        return Cnklist[i]
    if i==0:
        Cnklist[0]=1
        return 1
    Cnklist[i]=int((n-k+2-i)*Cnk(i-1)/i)
    return Cnklist[i]

Cklist=[None for i in range(2001)]
def Ck(i):
    global modnum
    if Cklist[i]!=None:
        return Cklist[i]
    if i==0:
        Cklist[0]=1
        return 1
    Cklist[i]=int((k-i)*Ck(i-1)/i)
    return Cklist[i]


for i in range(1,k+1):
    print((Cnk(i)*Ck(i-1))%modnum)

### FIXED CODE ###

import sys

sys.setrecursionlimit(10000000)

#ボールの数、青いボールの数を書く
n,k=[int(i) for i in input().split()]

#modnum 定義
modnum=1000000007

#dp用のコンビネーションリスト
Cnklist=[None for i in range(2001)]
def Cnk(i):
    if Cnklist[i]!=None:
        return Cnklist[i]
    if i==0:
        Cnklist[0]=1
        return 1
    Cnklist[i]=(n-k+2-i)*Cnk(i-1)//i
    return Cnklist[i]

#dp用のコンビネーションリスト
Cklist=[None for i in range(2001)]
def Ck(i):
    if Cklist[i]!=None:
        return Cklist[i]
    if i==0:
        Cklist[0]=1
        return 1
    Cklist[i]=(k-i)*Ck(i-1)//i
    return Cklist[i]


for i in range(1,k+1):
    print((Cnk(i)*Ck(i-1))%modnum)