Harryxun/stf_run huggingface dataset:
n = int(raw_input())
a = map(int,raw_input().split(' '))
b = []
for i in range(n):
    if i%2 == 0:
        b.append(a[i])
    else:
        b.insert(0,a[i])
if n%2 != 0:
    b.reverse()
s = str(b[0])
for i in range(n-1):
    s += ' ' + str(b[i+1])
print s

### FIXED CODE ###

a,b,c = map(int,raw_input().split())
print(min([a+b,b+c,c+a]))
n = int(input())
 
def p(x):
  if x == 2:
    return True
  for i in range(x//2):
    if x % i == 0:
      return False
  return True
 
for i in range(n,2*n):
  if p(i):
    print(i)
    break

### FIXED CODE ###

n = int(input())
 
def p(x):
  if x == 2:
    return True
  for i in range(2,x//2):
    if x % i == 0:
      return False
  return True
 
for i in range(n,2*n):
  if p(i):
    print(i)
    break
#include <bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin >> N;
    int con;
    con = 0;
    vector<vector<int>> parts(3, vector<int>(N));

    for(int i = 0;i < 3; i++){
        for(int j = 0;j < N; j++){
            cin >> parts[i][j];
        }
    }

    for (int i = 0;i < N; i ++){
        for (int j = 0;j < N; j++){
            if (parts[2][i] > parts[1][j]){
                for (int k = 0;k < N; k++){
                    if (parts[1][j] > parts[0][k]){
                        con += 1;

                    } 
                }
            }
        }
    }
    cout << con << endl;
}

### FIXED CODE ###

import bisect

N = int(input())
parts = [[] for i in range(3)]
con = [0] * N

ans = 0

for i in range(3):
  t = sorted(list(map(int,input().split())))
  parts[i] = t

under =parts[2]
middle = parts[1]
upper = parts[0]

for i in range(N):
  p = middle[i]
  ans += bisect.bisect_left(upper,p) * (N - bisect.bisect_right(under,p))
    
print(ans)
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    a_list = [int(i) for i in input().split()]
    kind = set(a_list)
    if len(kind) not in (1, 2, 3):
        print("No")
        return
    # 1 0 1
    # 1 2 3
    if len(kind) == 1 and kind[0] == 0:
        print("Yes")
        return
    elif len(kind) == 3:
        if n % 3 != 0 or len(set([a_list.count(k) for k in kind])) != 1:
            print("No")
            return
        kind = list(kind)
    else:
        a, b = kind
        a_c, b_c = a_list.count(a), a_list.count(b)
        if 0 not in kind or abs(a_c - b_c) > 1:
            print("No")
            return
        if a == 0:
            if a_c > b_c:
                print("No")
                return
            kind = [b, a, b]
        else:
            if b_c > a_c:
                print("No")
                return
            kind = [a, b, a]
    kind.extend([kind[0], kind[-1]])
    for i in range(3):
        if kind[i] != kind[i - 1] ^ kind[i + 1]:
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

input = sys.stdin.readline


def check(n, nums):
    kind = set(nums)
    if len(kind) > 3:
        return False
    if len(kind) == 1 and 0 in kind:
        return True
    if n % 3 != 0:
        return False
    if len(kind) == 3:
        a, b, c = kind
        return nums.count(a) == nums.count(b) == nums.count(c) and a ^ b ^ c == 0
    else:
        return 0 in kind and n / 3 == nums.count(0)


def main():
    n = int(input())
    a_list = [int(i) for i in input().split()]
    print("Yes" if check(n, a_list) else "No")
    # 0 0 0
    # 1 0 1 1 0 1
    # 1 2 3


if __name__ == "__main__":
    main()
n,a,b = list(map(int, input().split()))
m = (10 ** 9) + 7
dp = [-1] * (n+1)
total = 0

for i in range(0, n+1):
    if(i > 0):
        x = i * dp[i - 1]

        if(x <= m):
            dp[i] = x
        else:
            dp[i] = x % m
    else:
        dp[0] = 1

if n > 2:
    for i in range(1, n+1):
        if(i != a and i != b):
            total += int(dp[n] / (dp[i] * dp[n-i]))
            total = total % m
    
print(total)


### FIXED CODE ###

n, a, b = list(map(int, input().split()))
p = (10 ** 9) + 7

def powmod(x, exp, mod):
    if(exp == 1):
        return x % mod

    if(exp % 2 == 1):
        return (x * powmod(x, exp - 1, mod)) % mod

    x = powmod(x, exp / 2, mod)

    return (x * x) % mod

# nCrを計算するが、nもrも巨大なためフェルマーの小定理を利用する
# x = nPr
# y = r!
# x / y ≡ x * y^-1
# p を法とした時、掛けるたびにmodをとった数同士の割り算はうまくいかない
# フェルマーの小定理から
# y^(p-1) ≡ 1
# y * y^(p-2) ≡ 1
# y^(p-2)がyの逆元と同じ振る舞いをするのでy^(p-2)を掛ける
def combination(n, r, mod):
    x = 1
    y = 1

    for i in range(r):
        x *= n - i # n * (n - 1) * (n - 2) * ... * (n - i + 1)
        x %= mod
        y *= i + 1 # r * (r - 1) * (r - 2) * ... * 2 * 1 を逆さまにかけていく
        y %= mod

    return x * powmod(y, mod - 2, mod) % mod


total = powmod(2, n, p) - 1 #1本も花を選ばないパターンは除外する
comb_a = combination(n, a, p)
comb_b = combination(n, b, p)


print((total - comb_a - comb_b) % p)
H, W, M = map(int, input().split())

targets = [[0] * W for _ in range(H)]
n_target_h = [0] * H
n_target_w = [0] * W

for i in range(M):
    h, w = map(int, input().split())
    targets[h - 1][w - 1] = 1
    n_target_h[h - 1] += 1
    n_target_w[w - 1] += 1

h_max = max(n_target_h)
w_max = max(n_target_w)

bomb_h = [i + 1 for i, h in enumerate(n_target_h) if h == h_max]
bomb_w = [i + 1 for i, w in enumerate(n_target_w) if w == w_max]

ans = h_max + w_max - 1
for h in bomb_h:
    for w in bomb_w:
        if targets[h - 1][w - 1] == 0:
            ans = h_max + w_max
            break
    else:
        continue
    break

print(ans)

### FIXED CODE ###

H, W, M = map(int, input().split())

targets = []
n_target_h = [0] * H
n_target_w = [0] * W

for i in range(M):
    h, w = map(int, input().split())
    targets.append((h, w))
    n_target_h[h - 1] += 1
    n_target_w[w - 1] += 1

h_max = max(n_target_h)
w_max = max(n_target_w)

bomb_h = [i + 1 for i, h in enumerate(n_target_h) if h == h_max]
bomb_w = [i + 1 for i, w in enumerate(n_target_w) if w == w_max]

count = len(bomb_h) * len(bomb_w)
for target in targets:
    if (n_target_h[target[0] - 1] == h_max) and (n_target_w[target[1] - 1] == w_max):
        count -= 1

if count > 0:
    ans = h_max + w_max
else:
    ans = h_max + w_max - 1

print(ans)
n = int(input())
w = list(map(int, input().split()))

res = sum(w)
sum1 = 0
sum2 = sum(w)
for i in range(n):
    sum1 += w[i]
    sum2 -= w[i]
    res = min(res, abs(sum2-sum1))

print(ans)

### FIXED CODE ###

n = int(input())
w = list(map(int, input().split()))

res = sum(w)
sum1 = 0
sum2 = sum(w)
for i in range(n):
    sum1 += w[i]
    sum2 -= w[i]
    res = min(res, abs(sum2-sum1))

print(res)
#coding:utf-8
import sys

BAMB_NUM = 0
BAMB_A = 0
BAMB_B = 0
BAMB_C = 0
BAMB_LIST = []

def calcMP(idx, lenA, lenB, lenC):
    # when classified all bamboos
    if (idx == BAMB_NUM):
        # exists a zero length bamboo
        if (lenA <= 0 or lenB <= 0 or lenC <= 0):
            return sys.maxsize
        return abs(lenA - BAMB_A) + abs(lenB - BAMB_B) + abs(lenc - BAMB_C)
    
    # don't use idx-th bamboo
    mp = calcMP(idx+1, lenA, lenB, lenC)

    # use idx-th bamboo
    mp = min(mp, calcMP(idx + 1, lenA + BAMB_LIST[idx], lenB, lenC) + (BAMB_A > 0 ? 10 : 0))
    mp = min(mp, calcMP(idx + 1, lenA, lenB + BAMB_LIST[idx], lenC) + (BAMB_B > 0 ? 10 : 0))
    mp = min(mp, calcMP(idx + 1, lenA, lenB, lenC + BAMB_LIST[idx]) + (BAMB_C > 0 ? 10 : 0))

    return mp

if __name__ == "__main__":
    """
    http://drken1215.hatenablog.com/entry/2019/02/24/224100
    """
    # requested bamboo lengths
    bamb_num, bambA, bambB, bambC = map(lambda x: int(x), input().split())
    # available bamboo lengths
    bamb_list = []
    for bamb in range(bamb_num):
        bamb_list.append(int(input()))

    mp = calcMP(0, 0, 0, 0)
    print(mp)

### FIXED CODE ###

#coding:utf-8

if __name__ == "__main__":
    date = input()
    year, month, day = date.split("/")

    if int(year) <= 2019:
        if int(month) <= 4:
            if int(day) <= 30:
                print("Heisei")
                exit()
    
    print("TBD")
n = int(input())
a = [int(x) for x in input().split()]

a_even = []
for ai in a:
    if ai%2 == 0:
        a_even += [ai]

for a_eveni in a_even:
    if a_eveni%3 != 0 or a_eveni%5 != 0:
        ans = "DENIED"
    else:
        ans = "APPROVED"
print(ans)

### FIXED CODE ###

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

a_even = []
for ai in a:
    if ai%2 == 0:
        a_even += [ai]

ans = "APPROVED"
for a_eveni in a_even:
    if a_eveni%3 != 0 and a_eveni%5 != 0:
        ans = "DENIED"
        break

print(ans)
import numpy as np
X = int(input())

t = np.arange(-1000000, 1000001, 1)
t = t**5
S = set(t)

for B in range(-100000,100001,1):
    if X+B**5 in S:
        print("%d %d"%((X+B**5)**0.2, B))
        break


### FIXED CODE ###

import numpy as np
X = int(input())

t = np.arange(0, 2000001, 1)
t = t**5
S = set(t)

for B in range(0,200001,1):
    if X+B**5 in S:
        print("%d %d"%((X+B**5)**0.2, B))
        break
    if X-B**5 in S:
        print("%d %d"%((X-B**5)**0.2, -B))
        break
n = int(intput())

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

sa = sorted(a)

if n % 2 == 0;
  k = 0
else;
  k = 1

flag = True

for i,s in enumerate(sa);
  if (i//2)*2+k != s;
    flag = false

if flag;
  print(2**n//2)
else;
  print(0)


### FIXED CODE ###

n = int(input()) 
a = list(map(int,input().split())) 
sa = sorted(a) 

if n % 2 == 0:
  k = 1
  l = 0
else:
  k = 0
  l = 1 

a=1000000007
flag = True 
for i,s in enumerate(sa):
  if ((i+l)//2)*2+k != s:
    flag = False
if flag:
  print(2**(n//2) % a)
else:
  print(0)
H, W = map(int, input().split())
arr = ['']*H
for i in range(H):
    arr[i] = input().split(' ')
 
#print(arr)
dp = [[0]*W for _ in range(H)]

# arr =[
# ['.','.'],
# ['#','.'],
# ['.','.'],
# ['.','#'],
# ['.','.']
# ]








flag= False
for h in range(H-1,-1,-1):
    #print(h,W-1)

    if arr[h][W-1]=='#':
        dp[h][W-1]=0
        flag =  True
    if flag:
        dp[h][W-1]=0
    else:
        dp[h][W-1]=1
#print(dp)
    
flag = False
for w in range(W-1,-1,-1):
    #print(h,W-1)
    if arr[H-1][w]=='#':
        dp[H-1][w]=0
        flag =  True
    if flag:
        dp[H-1][w]=0
    else:
        dp[H-1][w]=1


#print(dp)

MOD = 10**9+7

dp[H-1][W-1]=0

for row in range(H-1,0,-1):
    for col in range(W-1,0,-1):
        if arr[row-1][col-1]=='#':
            dp[row-1][col-1]=0
        elif dp[row][col-1] ==0 or dp[row-1][col]==0:
            dp[row-1][col-1] = max(dp[row][col-1],  dp[row-1][col])
            dp[row-1][col-1]%=MOD

        elif dp[row][col-1] > 0 and dp[row-1][col]>0:
            dp[row-1][col-1] = dp[row][col-1] +  dp[row-1][col]
            dp[row-1][col-1]%=MOD
        elif  dp[row][col-1] == 0 and dp[row-1][col] == 0:
            dp[row-1][col-1]==0


print(dp[0][0])



            
    


### FIXED CODE ###



H, W = map(int, input().split())
arr = ['']*H
for i in range(H):
    arr[i] = input()
 
#print(arr)
dp = [[0]*W for _ in range(H)]

# arr =[
# ['.','.'],
# ['#','.'],
# ['.','.'],
# ['.','#'],
# ['.','.']
# ]








flag= False
#print(arr)
for h in range(H-1,-1,-1):
    #print(h,W-1)

    if arr[h][W-1]=='#':
        dp[h][W-1]=0
        flag =  True
    if flag:
        dp[h][W-1]=0
    else:
        dp[h][W-1]=1
#print(dp)
    
flag = False
for w in range(W-1,-1,-1):
    #print(h,W-1)
    if arr[H-1][w]=='#':
        dp[H-1][w]=0
        flag =  True
    if flag:
        dp[H-1][w]=0
    else:
        dp[H-1][w]=1


#print(dp)

MOD = 10**9+7

dp[H-1][W-1]=0

for row in range(H-1,0,-1):
    for col in range(W-1,0,-1):
        if arr[row-1][col-1]=='#':
            dp[row-1][col-1]=0
        elif dp[row][col-1] ==0 or dp[row-1][col]==0:
            dp[row-1][col-1] = max(dp[row][col-1],  dp[row-1][col])
            dp[row-1][col-1]%=MOD

        elif dp[row][col-1] > 0 and dp[row-1][col]>0:
            dp[row-1][col-1] = dp[row][col-1] +  dp[row-1][col]
            dp[row-1][col-1]%=MOD
        elif  dp[row][col-1] == 0 and dp[row-1][col] == 0:
            dp[row-1][col-1]==0


print(dp[0][0])
sa=input()
sb=input()
sc=input()
print(sa[0])
while True:
  k="a"
  if k=="a":
    if sa==[]:
      print("A")
      exit()
    else:
      k=sa[0]
      sa=sa[1:]
  if k=="b":
    if sb==[]:
      print("B")
      exit()
    else:
      k=sb[0]
      sb=sb[1:]
  if k=="c":
    if sc==[]:
      print("C")
      exit()
    else:
      k=sc[0]
      sc=sc[1:]

### FIXED CODE ###


SA = input()
SB = input()
SC = input()
turn = "a"
while min(len(SA), len(SB), len(SC)) >= 0:
    if turn == "a":
        if len(SA) == 0:
            print("A")
            break
        else:
            turn = SA[0]
            SA = SA[1:]
    elif turn == "b":
        if len(SB) == 0:
            print("B")
            break
        else:
            turn = SB[0]
            SB = SB[1:]
    else:
        if len(SC) == 0:
            print("C")
            break
        else:
            turn = SC[0]
            SC = SC[1:]
K = int(input())
S = input()
if len(S)<=K:
  print(S)
else:
  print(S[0]+S[1]+S[2]+S[3]+S[4]+S[5]+S[6]+"...")

### FIXED CODE ###

K = int(input())
S = input()
if len(S)<=K:
  print(S)
else:
  print(S[0:K]+"...")
from fractions import gcd
from functools import reduce
input()
print(reduce(gcd,map(input().split())))

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=sys.stdin.readline
def resolve():
    n=int(input())
    A=map(int,input().split())
    from fractions import gcd
    from functools import reduce
    print(reduce(gcd,A))
resolve()
N, K, Q = map(int, input().split()) 

def change_score(N ,A, score):
    score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

score = np.array([K]*N)
for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    print(score)
    f_score = score

for i in f_score:
    if i > 0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

import numpy as np

N, K, Q = map(int, input().split()) 
score = np.array([0]*N)

def change_score(N ,A, score):
    #score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)
    f_score = score

for i in f_score:
    if i + K - Q > 0:
        print("Yes")
    else:
        print("No")
A,B,T = map(int,input().split)
count = int((T+0.5)/A)
ans = B*count
print(ans)

### FIXED CODE ###

A,B,T = map(int,input().split())
count = int((T+0.5)/A)
ans = B*count
print(ans)
n = int(input())
ais = list(map(int, input().split()))
evens = []
for a in ais:
  if a % 2 == 0:
    evens.append(a)
if len(evens) == 0:
  print("DENIED")
  puit()
m = 0
for e in evens:
  if e % 3 == 0 or e % 5 == 0:
    pass
  else:
    m += 1
if m == 0:
  print("APPROVED")
else:
  print("DENIED")
  


### FIXED CODE ###

n = int(input())
ais = list(map(int, input().split()))
evens = []
for a in ais:
  if a % 2 == 0:
    evens.append(a)
if len(evens) == 0:
  print("APPROVED")
  quit()
m = 0
for e in evens:
  if e % 3 == 0 or e % 5 == 0:
    pass
  else:
    m += 1
if m == 0:
  print("APPROVED")
else:
  print("DENIED")
import sys
 
string = str()
 
for line in sys.stdin:
    string += line.lower()

string = input().lower()
alph = ['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']

for letter in alph:
	sum = 0
	n = -1
	while True:
		n = string.find(letter, n + 1)
		if n == -1:
			break
		sum += 1
	print("{} : {}".format(letter, sum))

### FIXED CODE ###

import sys
 
string = str()
 
for line in sys.stdin:
    string += line.lower()

alph = ['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']

for letter in alph:
	sum = 0
	n = -1
	while True:
		n = string.find(letter, n + 1)
		if n == -1:
			break
		sum += 1
	print("{} : {}".format(letter, sum))
N = input()

D = sorted([int(v) for v in input().split()])
arc = N // 2
abc = arc - 1
print(D[arc] - D[abc])


### FIXED CODE ###

N = int(input())

D = sorted([int(v) for v in input().split()])
arc = N // 2
abc = arc - 1
print(D[arc] - D[abc])
import numpy as np
n,m=map(int,input().split())
x=list(map(int,input().split()))

arr=np.array(sorted(x))
dif=np.diff(arr)

lis=dif.tolist()
lis=sorted(lis,reverse=True)

if m>1:
    for i in range(n-1):
        lis.pop(0)

print(sum(lis))

### FIXED CODE ###

import numpy as np
n,m=map(int,input().split())
x=list(map(int,input().split()))

arr=np.array(sorted(x))
dif=np.diff(arr)

lis=dif.tolist()
lis=sorted(lis,reverse=True)

for i in range(n-1):
    if len(lis)>0:
        lis.pop(0)

print(sum(lis))
N, K = map(int, input().split())
S = input()
last_s = "0"
count = 0
A = []
for i, s in enumerate(S):
	if i == 0:
		if s == "1":
			count += 1
		else:
			count -= 1
	else:
		if s != last_s:
			A.append(count)
			count = 0
		if s == "1":
			count += 1
		else:
			count -= 1
	last_s = s

if count != 0:
	A.append(count)

for i in range(10):
	A.append(0)


val = 0
if A[0] < 0:
	for i in range(2*K): 
		val += abs(A[i])
	currentMax = val
	old = abs(A[0])
	new = abs(A[1+2*K+1]) + abs(A[1+2*K+3])
	val += new - old
	if val > currentMax:
		currentMax = val
	for i in range(3, len(A)-2*K-2, 2):
		old_sum_of_two = abs(A[i]) + abs(A[i+1])
		sum_of_two = sum(A[i+2*K+1:i+2*K+3])
		val += sum_of_two - old_sum_of_two
		if val > currentMax:
			currentMax = val
	print(currentMax)
else:
	for i in range(2*K+1): 
		val += abs(A[i])
	currentMax = val
	for i in range(0, len(A)-2*K-2, 2):
		old_sum_of_two = abs(A[i]) + abs(A[i+2])
		sum_of_two = abs(A[i+2*K+1]) + abs(A[i+2*K+2])
		val += sum_of_two - old_sum_of_two
		if val > currentMax:
			currentMax = val
	print(currentMax)



### FIXED CODE ###

N, K = map(int, input().split())
S = input()
last_s = "0"
count = 0
A = []
for i, s in enumerate(S):
	if i == 0:
		count += 1
	else:
		if s != last_s:
			A.append(count)
			count = 0
		count += 1
	last_s = s

if count != 0:
	A.append(count)

A.append(0)
A.append(0)

val = 0

if S[0] == "0":
	val = sum(A[:2*K])
	currentMax = val
	old = A[0]
	new = sum(A[2*K:2*K+2])
	val += new - old
	if val > currentMax:
		currentMax = val
	
	for i in range(1, len(A)-2*K, 2):
		old_sum_of_two = sum(A[i:i+2])
		sum_of_two = sum(A[i+2*K+1:i+2*K+3])
		val += sum_of_two - old_sum_of_two
		if val > currentMax:
			currentMax = val
	print(currentMax)
else:
	val = sum(A[:2*K+1])
	currentMax = val
	for i in range(0, len(A)-2*K, 2):
		old_sum_of_two = sum(A[i:i+2])
		sum_of_two = sum(A[i+2*K+1:i+2*K+3])
		val += sum_of_two - old_sum_of_two
		if val > currentMax:
			currentMax = val
	print(currentMax)
def solve():
    a,b = list(map(int, input().split()))
    product = a * b
    if (product % 2 == 0):
        print('Even')
    else:
        print('Odd')

 solve()

### FIXED CODE ###

def solve():
    a,b = list(map(int, input().split()))
    product = a * b
    if (product % 2 == 0):
        print('Even')
    else:
        print('Odd')
solve()
n=int(input())
s=int(input())

def f(b,n):
	if n < b:
		return n
	else:
		return f(b,n//b)+n%b

ans=-1
if s>n:
  pass
elif s==n:
	ans=n+1
else:
	for _b in range(2,int(n**0.5)+1):
		if f(_b,n)==s:
			ans=_b
			break
	if ans==-1:
		for _p in range(1,int(n**0.5)+1):
			_b = (n-s)//_p+1
			if f(_b,n)==s:
				ans=_b
				break
print(ans)

### FIXED CODE ###

n=int(input())
s=int(input())

def f(b,n):
	if b < 2:
		return 0
	if n < b:
		return n
	else:
		return f(b,n//b)+n%b

ans=-1
if s==n:
	ans=n+1
else:
	for _b in range(2,int(n**0.5)+1):
		if f(_b,n)==s:
			ans=_b
			break
	if ans==-1:
		for _p in range(int(n**0.5),0,-1):
			_b = (n-s)//_p+1
			if f(_b,n)==s:
				ans=_b
				break
print(ans)
S=input()
if len(S)==1:
    print('1')
else:
    k=0
    L=[]
    while k < (len(S)-1):
        if S[k] != S[k+1]:
            L.append(max(k,len(S)-k))
            k += 1
        else:
            k += 1
    L.sort()
    print(L[0])

### FIXED CODE ###

S=input()
if len(S)==1:
    print('1')
else:
    k=0
    L=[]
    while k < (len(S)-1):
        if S[k] != S[k+1]:
            L.append(max(k+1,len(S)-k-1))
            k += 1
        else:
            k += 1
    L.sort()
    if len(L)==0:
        print(len(S))
    else:
        print(L[0])
bingo = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
number = [int(input()) for _ in range(N)]

check = [[0 for _ in range(3)] for _ in range(3)]

for i in range(N):
  for j in range(3):
    for k in range(3):
      if bingo[j][k] == N[i]:
        check[j][k] = 1
        
ans = 'No'
for i in range(3):
  if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1:
    ans = 'Yes'
    
for i in range(3):
  if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1:
    ans = 'Yes'
    
if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:
  ans = 'Yes'
  
if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:
  ans = 'Yes'
  
print(ans)

### FIXED CODE ###

bingo = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
number = [int(input()) for _ in range(N)]

check = [[0 for _ in range(3)] for _ in range(3)]

for i in range(N):
  for j in range(3):
    for k in range(3):
      if bingo[j][k] == number[i]:
        check[j][k] = 1
        
ans = 'No'
for i in range(3):
  if check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1:
    ans = 'Yes'
    
for i in range(3):
  if check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1:
    ans = 'Yes'
    
if check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1:
  ans = 'Yes'
  
if check[0][2] == 1 and check[1][1] == 1 and check[2][0] == 1:
  ans = 'Yes'
  
print(ans)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: str(sys.stdin.buffer.readline().rstrip())
rs = lambda: map(str, sys.stdin.buffer.readline().split())
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
a = rl()
def heapsort(l):
  li = []
  for v in len(l):
    heappush(li, v)
  return [heappop(li) for _ in range(li)]
a = heapsort(a)
a.reverse()
ans = a[0]
for i in a:
  ans = (ans + i)/2
print(ans)


### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: str(sys.stdin.buffer.readline().rstrip())
rs = lambda: map(str, sys.stdin.buffer.readline().split())
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
a = rl()
def heapsort(l):
  li = []
  for v in l:
    heapq.heappush(li, v)
  return [heapq.heappop(li) for _ in range(len(li))]
a = heapsort(a)
ans = a[0]
for i in a:
  ans = (ans + i)/2
print(ans)
from math import gcd

def lcm(a,b):
    return a*(b//gcd(a,b))

mod=10**9+7

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

L=A[0]
for i in range(1,n):
    L=lcm(L,A[i])
L%=mod

ans=0
for i in range(n):
    ans+=(L//A[i])%mod
print(ans)

### FIXED CODE ###

from fractions import gcd

def lcm(a,b):
    return a*(b//gcd(a,b))

mod=10**9+7

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

L=A[0]
for i in range(1,n):
    L=lcm(L,A[i])
L%=mod

coef=sum(pow(x,mod-2,mod) for x in A)
print(L*coef%mod)
X = int(input())

while True:
    if X >= 500:
        C = X // 500
        X = X - (500 * C)
    elif X >= 5:
        D = X // 5
        X = X - (5 * D)
    else:
        break

total = (500 * C) + (5 * D)

print(total)

### FIXED CODE ###

X = int(input())

C = 0
P = 0
D = 0
L = 0
total = 0

if X >= 0 and X <= 10 ** 9:
    while True:
        if X >= 500:
            C = X // 500
            P = 500 * C
            X = X - P
        elif X >= 5:
            D = X // 5
            L = 5 * D
            X = X - L
        else:
            break
man = 1000 * C
t   = 5 * D

total = man + t

print(total)
import math
x = int(raw_input())
now = 100
ans = 0
while(now < x):
    ans += 1
    now *= 1.01
    now = math.floor(now)
print(ans)


### FIXED CODE ###

import math
x = int(input())
now = 100
ans = 0
while(now < x):
    ans += 1
    now += now//100
print(ans)