Harryxun/stf_run huggingface dataset:
from _collections import deque
n,m=map(int,input().split())
X=[[] for _ in range(n)]
visited=[0]*(n+1)
ANS=[0]*n
ANS[0]=1
for i in range(m):
    a,b=map(int,input().split())
    X[a-1].append(b-1)
    X[b-1].append(a-1)

q=deque([0])
visited[0]=1
while len(q)>0:
    s=q.popleft()
    for x in X[s]:
        if visited[x]:
            continue
        q.append(x)
        ANS[x]=s
        visited[x]=1
    print(ANS)
print('Yes')
for ans in ANS[1:]:
    print(ans+1)

### FIXED CODE ###

from _collections import deque
n,m=map(int,input().split())
X=[[] for _ in range(n)]
visited=[0]*(n+1)
ANS=[0]*n
ANS[0]=1
for i in range(m):
    a,b=map(int,input().split())
    X[a-1].append(b-1)
    X[b-1].append(a-1)

q=deque([0])
visited[0]=1
while len(q)>0:
    s=q.popleft()
    for x in X[s]:
        if visited[x]:
            continue
        q.append(x)
        ANS[x]=s
        visited[x]=1
print('Yes')
for ans in ANS[1:]:
    print(ans+1)
from scipy.special import comb
N,K = map(int, input().split())
mod = 10**9 +7
m = 0
if N - K > K - 1:
    m = K
else:
    m = N - K + 1

for i in range(1,m+1):
    a = comb(K-1, i-1, exact=True)%mod
    b = comb(N-K+1, N-K-i+1, exact=True)%mod
    print(a*b%mod)

### FIXED CODE ###

from operator import mul
from functools import reduce

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

if N - K > K - 1:
    m = K
else:
    m = N - K + 1

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

for i in range(1,K+1):
    if i <= m:
        a = cmb(K-1, i-1)%mod
        b = cmb(N-K+1, N-K-i+1)%mod
        print(a*b%mod)
    else:
        print(0)
#!/usr/bin/env python3

#!/usr/bin/env python3

N, D = map(int, input().split())
X = [list(map(int, input().split())) for i in range(N)]
cnt = 0

def dist(X,i,j):
    dist = 0
    for k in range(D):
        dist += (X[i][k] - X[j][k]) **2
    dist = dist ** 0.5
    return dist.is_integer()

for i in range(N):
    for j in range(N):
        if i >= j :
            continue
        else:
            if dist(X,i,j):
                cnt += 1

print(cnt)

### FIXED CODE ###

#!/usr/bin/env python3

X = int(input())
ans = 0

while X >= 500:
    X -= 500
    ans += 1000
while X >= 5:
    X -= 5
    ans += 5
print(ans)
a = input()
if a.isupper():
  print('A')
elif:
  print('a')


### FIXED CODE ###

a = input()
if a.isupper():
  print('A')
else:
  print('a')
a* = map(int, input().split())
print(max(a) - min(a))

### FIXED CODE ###

a = list(map(int, input().split()))
print(max(a) - min(a))
n,m=map(int,input().split())
k=[]
a=[]
for i in range(n):
    k.append(int(input()))
    a.append(list(map(int,input().split())))
ans=0
for i in range(n):
    f=True
    for j in range(m):
        if a[j]==0:
            f=False
    if f:
        ans+=1
print(ans)


### FIXED CODE ###

n,m=map(int,input().split())

l=[0]*m
for i in range(n):
    ka=list(map(int,input().split()))
    A=ka[1:]
    for a in A:
        l[a-1]+=1
ans=0
for i in l:
    if i==n:
        ans+=1
print(ans)
# coding: utf-8

n,k = map(int, input().split())
s = input()

low = s[k].lower()
print(s[:k]+low+s[k+1:])

### FIXED CODE ###

# coding: utf-8

n,k = map(int, input().split())
s = input()

low = s[k-1].lower()
print(s[:k-1]+low+s[k:])
a,b=wap(int,input().split())
if a+b>9:
  print("error")
else:
  print(a+b)

### FIXED CODE ###

a,b=map(int,input().split())
if a+b>9:
  print("error")
else:
  print(a+b)
N = input()
a = []
for i in range(N):
    a.append(input())
max_profit = a[1] - a[0]
for i in range(2,N):
	if a[i] - a[i-1] > max_profit
		max_profit = a[i] - a[i-1]
print(str(max_profit))

### FIXED CODE ###

N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
max_profit = a[1] - a[0]
min_val = min(a[1],a[0])
for i in range(2,N):
	if a[i] < min_val:
		min_val = a[i]
	elif a[i] - min_val > max_profit:
		max_profit = a[i] - min_val
print(str(max_profit))
k = input()
if k % 2 == 1:
    print(k//2 * (k//2+1))
else:
    print(k//2 * k//2)


### FIXED CODE ###

k = int(input())
if k % 2 == 1:
    print(k//2 * (k//2+1))
else:
    print(k//2 * k//2)
import sys
input = sys.stdin.readline
N, K = [int(x) for x in input().strip().split()]
A = [int(x) for x in input().strip().split()]
T_A = 0
T_A_all = 0
for i,a in enumerate(A):
    T_A += len([1 for x in A[i+1:] if a > x])
    T_A_all += len([1 for x in A if a > x])
T_B = 0
for i in range(N):
    for j in range(i + 1, N):
        if A[i] > A[j]:
            T_B += 1
T_B_all = 0
for i in range(N):
    for j in range(N):
        if A[i] > A[j]:
            T_B_all += 1
print(T_A,T_B)
print(T_A_all,T_B_all)

a = T_A
z = T_A + T_A_all * (K -1)
print(int((K*(a+z)//2)%((10**9)+7)))


### FIXED CODE ###

M, D = [int(x) for x in input().split()]
ret = 0
for m in range(1, M+1):
  for d10 in range(2, 10):
    for d1 in range(2, 10):
      d = 10 * d10 + d1
      if d > D:
        break
      if d1 * d10 == m:
        ret += 1
    if d10 > D:
      break
print(ret)
num = input()
list = map(int, raw_input().split())
count1 = 0
count4 = 0
for x in list:
    if x % 2 == 1:
        count1 = count1 + 1
    if x % 4 == 0:
        count4 = count4 + 1
if count1 > count4 and num > 3:
    print("No")
elif num = = 2 and count4 - count1 >= 0
    print("Yes")
elif num == 3 and count4 > 0 or count1 == 0
    print("Yes") 
else:
    print("Yes")


### FIXED CODE ###

num = input()
list = map(int, raw_input().split())
count1 = 0
count4 = 0
for x in list:
    if x % 2 == 1:
        count1 = count1 + 1
    if x % 4 == 0:
        count4 = count4 + 1
if count1 > count4 and num > 3 and count1 + count4 < num:
    print("No")
elif count1 > count4 + 1 and num > 3 and count1 + count4 == num:
    print("No")
elif num == 2 and count4 - count1 < 0:
    print("No")
elif num == 3 and count4 == 0 and count1 > 0:
    print("No") 
else:
    print("Yes")
from math import isclose

data = input().split()
a, b, c = [int(i) for i in data]

if isclose(((c-a-b) ** 2) - 4 * a * b, 0, abs_tol=1e-10):
  print('Yes')
else:
  print('No')


### FIXED CODE ###

data = input().split()
a, b, c = [int(i) for i in data]

if c-a-b >= 0:
  
  if ((c-a-b) ** 2) - 4 * a * b > 1e-10:
    print('Yes')
  else:
    print('No')
else:
  print('No')
def main():
    s = input()
    s_len = len(s)
    s_rev = reversed(s)
    mod = 2019
    d = [0] * mod
    d[0] = 1
    rev_num = 0
    # 2以上なら共通するmodがあったということになる
    for i in range(l_len):
        rev_num += int(s_rev(i)) * (10**i%mod)
        rev_num %= mod
        d[rev_num] += 1
    # 2以上同じmodがあったらそこから2つ選ぶ選び方
    # それを全てのmodで
    print(sum(i*(i-1)//2 for i in d))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    s = input()
    s_len = len(s)
    mod = 2019
    d = [0] * mod
    d[0] = 1
    rev_num = 0
    t = 1
    # 2以上なら共通するmodがあったということになる
    for i in reversed(s):
        rev_num += int(i) * t
        rev_num %= mod
        d[rev_num] += 1
        t *= 10
        t %= mod
    # 2以上同じmodがあったらそこから2つ選ぶ選び方
    # それを全てのmodで
    print(sum(i*(i-1)//2 for i in d))
 
if __name__ == '__main__':
    main()
x = input()
x = str(x)
f = True

for i in range(1,3)
	if(x[i-1] == x[i])
  		f = False
    	break
   
if f:
  print("Good")
else:
  print("Bad")

### FIXED CODE ###

x = input()
x = str(x)
f = True

for i in range(1,4):
  if(x[i-1] == x[i]):
    f = False
    break
   
if f:
  print("Good")
else:
  print("Bad")
#sort
N = int(input())
A = list(map(int, input().split()))
attend_list = []

for i in range(N):
  attend_list[A[i]-1] = i+1 

print(attend_list)

### FIXED CODE ###

#sort
N = int(input())
A = list(map(int, input().split()))
attend_list = [0]*N
 
for i in range(N):
  attend_list[int(A[i]-1)] = int(i+1) 

print(*attend_list)
n = input()
digit = n % 10
if digit == 3:
  print ("bon")
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print ("pon")
else:
  print ("hon")


### FIXED CODE ###

ninput = input() #これはstr型
n = int(ninput) #これでint型に直す
digit = n % 10
if digit == 3:
  print('bon')
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print('pon')
else:
  print('hon')
def readable(A, B, K):
    books_num = 0
    time = 0
    
    while(time < K):
        if len(A) == 0 and len(B) == 0:
            break
        elif len(A) != 0 and len(B) != 0:
            if A[0] < B[0]:
                time += A[0]
                temp = A[0]
                A.remove(A[0])
            else:
                time += B[0]
                temp = B[0]
                B.remove(B[0])
        elif len(A) == 0:
            time += B[0]
            temp = B[0]
            B.remove(B[0])
        elif len(B) == 0:
            time += A[0]
            temp = B[0]
            A.remove(A[0])
        if time <= K:
            books_num += 1
        
    return books_num

if __name__ == "__main__":
    N, M, K = map(int, input().split())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    print(readable(A, B, K))

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a, b = [0], [0]

for i in range(len(A)):
    a.append(a[i] + A[i])
for i in range(len(B)):
    b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N+1):
    if a[i] > K:
        break
    while a[i] + b[j] > K:
        j -= 1
    ans = max(ans, i+j)
    
print(ans)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

print(10 if ri() >= ri() else 0)
















### FIXED CODE ###

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

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7
a, b = rm()
print(10 if a >= b else 0)
import sys
dic={"A":["11","11"],"B":["1","1","1","1"],"C":["1111"],"D":["01","11","10"],
		"E":["110","011"],"F":["10","11","01"],"G":["011","110"]}
s=[]
linecnt=0
for line in sys.stdin:
	if line=="\n" or line=="":
		continue
	linecnt+=1
	if linecnt<8:
		s.append(line.rstrip("\n"))
	else:
		while s[0]=="00000000":
			del(s[0])
		while s[len(s)-1]=="00000000":
			del(s[len(s)-1])
		i=0
		while i<len(s[0]):
			for l in xrange(len(s)):
				if s[l][i]=="1":
					break
			else:
				for l in xrange(len(s)):
					s[l]=s[l][0:i]+s[l][i+1:len(s[l])]
				i-=1
			i+=1
		for d in dic.keys():
			if dic[d]==s:
				print d
				break
		while len(s)>0:
			del(s[0])
		linecnt=0

### FIXED CODE ###

import sys
dic={"A":["11","11"],"B":["1","1","1","1"],"C":["1111"],"D":["01","11","10"],
		"E":["110","011"],"F":["10","11","01"],"G":["011","110"]}
s=[]
linecnt=0
for line in sys.stdin:
	if line=="\n" or line=="":
		continue
	linecnt+=1
	if linecnt<8:
		s.append(line.rstrip("\n"))
	else:
		s.append(line.rstrip("\n"))
		while s[0]=="00000000":
			del(s[0])
		while s[len(s)-1]=="00000000":
			del(s[len(s)-1])
		i=len(s[0])-1
		while i>=0:
			for l in xrange(len(s)):
				if s[l][i]=="1":
					break
			else:
				for l in xrange(len(s)):
					s[l]=s[l][0:i]+s[l][i+1:len(s[l])]
			i-=1
		for d in dic.keys():
			if dic[d]==s:
				print d
				break
		while len(s)>0:
			del(s[0])
		linecnt=0
N=int(input())
point=[]
merge=0
for num in range(0,N):
    x,y=map(int,input().split())
    point.append([x,y])
p=0
q=0
point.sort()
ans=0
for i in range(0,N-1):
    for j in range(i+1,N):
        p=point[j][0]-point[i][0]
        q=point[j][1]-point[i][1]
        merge=0
        for k in range(0,N):
            if([point[k][0]+p,point[k][1]+q] in point):
                merge+=1
        ans=max(ans,merge)
print(N-ans)


### FIXED CODE ###

n, k = map(int, input().split())
l = [1]*k
n -= sum(l)
l[0] += n
print(max(l)-min(l))
CA = [list(map(int,input().split())) for _ in range(n)]

ans = 10**9

for i in range(2**n):
    ls = [0] * m
    tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            ls = [l + a for l, a in zip(ls, CA[j][1:])]
            tmp += CA[j][0]
    if all(i >= x for i in ls):
        ans = min(ans, tmp)
print(ans if ans != 10**9 else -1)

### FIXED CODE ###

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

ans = 10**9

for i in range(2**n):
    ls = [0] * m
    tmp = 0
    for j in range(n):
        if (i >> j) & 1:
            ls = [l + a for l, a in zip(ls, CA[j][1:])]
            tmp += CA[j][0]
    if all(i >= x for i in ls):
        ans = min(ans, tmp)
print(ans if ans != 10**9 else -1)
n = int(input())
a = list(map(int, input().split()))
x = [0] * n
x[0] += a[0]
for i in range(1, n, 2):
  x[0] - a[i] + a[i+1]

for i in range(1, n):
  x[i] = -x[i-1] + 2*a[i-1]
  
o = " ".join(x)
print(o)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
x = [0] * n
x[0] += a[0]
for i in range(1, n, 2):
  x[0] += - a[i] + a[i+1]

for i in range(1, n):
  x[i] = -x[i-1] + 2*a[i-1]
  
o = " ".join(map(str, x))
print(o)
N=int(input())
     
    X=list(map(int, input().split()))
     
    X.sort()
    i=X[0]
    min=10000000000
    while i <= X[-1]:
        power=0
        for j in range(len(X)):
            power=power+(X[j]-i)**2
     
        if power<=min:
            min=power
     
        i=i+1
     
     
    print(min)

### FIXED CODE ###

N=int(input())

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

X.sort()

min=10000000000
for P in range(100):

    power=0
    for j in range(len(X)):
        power=power+(X[j]-P)**2

    if power<=min:
        min=power

    P=P+1


print(min)
s1=input()
s2=input()
s3=s2[::-1]

if s1=s3:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s1=input()
s2=input()

cnt=0
for i in range(len(s1)):
    if s1[i]==s2[-i-1]:
        cnt+=1

if cnt == 3:
    print("YES")
else:
    print("NO")
N, M, C = map(int, input().split())                                                                                                                         
  2 B = list(map(int, input().split()))
  3  
  4 S = [[0]*M for i in range(N)]
  5 for i in range(N):
  6     S[i] = list(map(int, input().split()))
  7  
  8 b = 0
  9  
 10 for i in range(N):
 11     a = 0
 12     for ii in range(M):
 13         a += S[i][ii] * B[ii]
 14     a += C
 15     if a > 0:
 16         b += 1
 17  
 18 print(str(b))

### FIXED CODE ###

N, M, C = map(int, input().split())                                                                                                                         
B = list(map(int, input().split()))
 
S = [[0]*M for i in range(N)]
for i in range(N):
    S[i] = list(map(int, input().split()))
  
b = 0
  
for i in range(N):
    a = 0
    for ii in range(M):
        a += S[i][ii] * B[ii]
    a += C
    if a > 0:
        b += 1
print(str(b))
import heapq
x, y, z,  k = map(int, input().split())
a = list(int(x) for x in input().split())
b = list(int(x) for x in input().split())
c = list(int(x) for x in input().split())

a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

ab_1 = []
for i in a:
    for j in b:
        heapq.heappush(ab_1, -i-j)
key = min([k, x*y*z])
ab_2 = []
for i in range(key):
    value = heapq.heappop(ab_1)
    ab_2.append(-value)

abc = []
for p in ab_2:
    for q in c:
        heapq.heappush(abc, -p-q)
for i in range(key):
    value = heapq.heappop(abc)
    print(-value)

### FIXED CODE ###

x, y, z, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)
p = []
for i in a:
    for j in b:
        p.append(i+j)
p.sort(reverse=True)
p = p[:min(3001, x*y*z+1)]
q = []
for j in c:
    for i in p:
        q.append(i+j)
q.sort(reverse=True)
for i in range(k):
    print(q[i])
import math
a,b = list(map(int,input().split()))
g = math.gcd(a,b)
ans = 1
d = []
p = []
for i in range(1,int(g**0.5)+1): #因数リスト
    if g%i==0:
        if i!=1:
            d.append(i)
        if g//i!=1:
            d.append(g//i)
d = list(dict.fromkeys(d))
        
f = [True]*len(d)
for i in range(len(d)):
    for j in range(i):
        if d[i]>d[j] and d[i]%d[j]==0:
            f[i] = False
        if d[i]<d[j] and d[j]%d[i]==0:
            f[j] = False
print(f.count(True)+1)
            

### FIXED CODE ###

def gcd(a,b):
    if a<b:
        tmp = a
        a = b
        b = tmp
    while a!=b and b!= 0:
        c = a%b
        a = b
        b = c
    return a

a,b = list(map(int,input().split()))
g = gcd(a,b)
ans = 1
d = []
p = []
for i in range(1,int(g**0.5)+1): #因数リスト
    if g%i==0:
        if i!=1:
            d.append(i)
        if g//i!=1:
            d.append(g//i)
d = list(dict.fromkeys(d))
        
f = [True]*len(d)
for i in range(len(d)):
    for j in range(i):
        if d[i]>d[j] and d[i]%d[j]==0:
            f[i] = False
        if d[i]<d[j] and d[j]%d[i]==0:
            f[j] = False
print(f.count(True)+1)
from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(M)]
for i in range(M):
  a,b=map(int,input().split())
  road[a-1].append(b-1)
  road[b-1].append(a-1)
visit=[0]*N

q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
  while(q):
    v=q.popleft()
    #print(v)
    for x in road[v]:
      if(visit[x]==0):
        q.append(x)
        #print(q)
        visit[x]=1
        ans[x]=v+1
        #print(x)
bfs(q)
print("Yes")
for i in range(N-1):
  print(ans[i+1])

### FIXED CODE ###

from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(N)]
for i in range(M):
  a,b=map(int,input().split())
  road[a-1].append(b-1)
  road[b-1].append(a-1)
visit=[0]*N

q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
  while(q):
    v=q.popleft()
    #print(v)
    for x in road[v]:
      if(visit[x]==0):
        q.append(x)
        #print(q)
        visit[x]=1
        ans[x]=v+1
        #print(x)
bfs(q)
print("Yes")
for i in range(N-1):
  print(ans[i+1])
from heapq import *
from collections import defaultdict

N, M = map(int, input().split())
arbeits = defaultdict(list)
for _ in range(N):
    a, b = map(int, input().split())
    arbeits[a].append(b)
heap = []
ans = 0
for i in range(1, M+1):
    for b in arbeits[i]:
        heappush(heap, -b)
    ans += - heappop(heap)
print(ans)

### FIXED CODE ###

from heapq import *
from collections import defaultdict

N, M = map(int, input().split())
arbeits = defaultdict(list)
for _ in range(N):
    a, b = map(int, input().split())
    arbeits[a].append(b)
heap = []
ans = 0
for i in range(1, M+1):
    for b in arbeits[i]:
        heappush(heap, -b)
    if heap:
        ans += - heappop(heap)
print(ans)
o=input()
p=input()
print(''.join(i+j in zip (o,p))

### FIXED CODE ###

o=input()
p=input()
n=[]
for i in range(len(o)):
    n.append(o[i])
    if i <=len(p)-1:
        n.append(p[i])
print(''.join(n))
N = int(input())
M = int(input())
A = list(map(int(input().split)))
a = sum(A)
if V >= 0:
    print(a)
else:
    print(-1)
    
        


### FIXED CODE ###

N,M = map(int, input().split())
A = list(map(int, input().split()))
a = sum(A)
ans = N -a
if ans >= 0:
    print(ans)
else:
    print(-1)
dat =list( input().split())

for i in dat:
      i = int(i)

dat.sort(reverse=True)

asum=0
bsun=0

for i in range(len(dat)):
	if i%2==0:
		asum = asum + dat[i]
	else:
		bsum=bsum + dat[i]
		
print(asum-bsum)

### FIXED CODE ###

n = int(input())
dat = list(input().split())

dat = list(map(int,dat))

dat.sort(reverse=True)

asum = 0
bsum = 0

for i in range(n):
	if i % 2 == 0:
		asum = asum + dat[i]
	else:
		bsum = bsum + dat[i]
		
print(asum-bsum)
n, x = map(int, input().split())
l = list(map(int, input().split()))

tmp = 0
for i in range(n):
  tmp += l[i]
  if tmp > x:
    ans = i + 1
    break
print(ans)

### FIXED CODE ###

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

ans = 0
new_list = [0]
for i in range(n[0]):
  ans = ans + m[i]
  if ans <= n[1]:
    new_list.append(ans)
  elif ans > n[1]:
    break
    
print(len(new_list))
S = input()
print(700 + count("1")*100)

### FIXED CODE ###

S = input()
print(700 + S.count("o")*100)
return (x*x*x);

### FIXED CODE ###

n = input()

print n*n*n;
a, b, c = input().split()

a = int(a)
b = int(b)
c = int(c)

x, y, z = sort(a, b, c)

print(x, y, x)



### FIXED CODE ###

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

a.sort()

print(a[0], a[1], a[2])
import sys
sys.setrecursionlimit(10000)
n = int(input())
G = [[] for i in range(n)]
for i in range(n-1):
    x, y = map(int, input().split())
    G[x-1].append(y-1)
    G[y-1].append(x-1)
p = 10**9+7
Q = [0]
V = [False for i in range(n)]
C = [[] for i in range(n)]
while Q:
    x = Q.pop()
    V[x] = True
    for y in G[x]:
        if not V[y]:
            C[x].append(y)
            Q.append(y)
DP = [[None, None] for i in range(n)]
def dp(i, c):
    if DP[i][c] != None:
        return DP[i][c]
    tmp = 1
    for j in C[i]:
        if c == 0:
            tmp = (tmp*(dp(j, 0)+dp(j, 1))) % p
        else:
            tmp = (tmp*dp(j, 0)) % p
    DP[i][c] = tmp
    return DP[i][c]
print(dp(0, 0)+dp(0, 1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)
n = int(input())
G = [[] for i in range(n)]
for i in range(n-1):
    x, y = map(int, input().split())
    G[x-1].append(y-1)
    G[y-1].append(x-1)
p = 10**9+7
Q = [0]
V = [False for i in range(n)]
C = [[] for i in range(n)]
while Q:
    x = Q.pop()
    V[x] = True
    for y in G[x]:
        if not V[y]:
            C[x].append(y)
            Q.append(y)
DP = [[None, None] for i in range(n)]
def dp(i, c):
    if DP[i][c] != None:
        return DP[i][c]
    tmp = 1
    for j in C[i]:
        if c == 0:
            tmp = (tmp*(dp(j, 0)+dp(j, 1))) % p
        else:
            tmp = (tmp*dp(j, 0)) % p
    DP[i][c] = tmp
    return DP[i][c]
print((dp(0, 0)+dp(0, 1))%p)
k = int(input())
a,b = list(map(int,input().slplit()))
ret = ""
q = a//k
if a <= q*k or (q+1)*k <= b:
    ret = "OK"
else:
    ret ="NG"
print(ret)

### FIXED CODE ###

k = int(input())
a,b = list(map(int,input().split()))
ret = ""
q = a//k
if a <= q*k or (q+1)*k <= b:
    ret = "OK"
else:
    ret ="NG"
print(ret)
N = int(input())
K = int(input())
X = list(map(int, input().split()))
res = 0
for x in X:
    res += 2 * min(x, K - x)
print(res)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
print(sum(A[::2]) - sum(A[1::2]))
input x

pow(n,3)


### FIXED CODE ###

x=input('')

print(int(x)**3)
import math
n = int(input())
ans = math.factorial(10) // math.factorial(10 - (n-2))
print(ans % (10**9 + 7))

### FIXED CODE ###

n = int(input())
ans = 10**n - 9**n - 9**n + 8**n
print(ans % (10**9 + 7))
a,b,c = input().split()
print(a[0].upper() + b[0].upper() + c[0]upper()) 

### FIXED CODE ###


s1, s2, s3 = input().split()
print(s1[0].upper() + s2[0].upper() + s3[0].upper())
n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

cnt = 0
for i in range(n):
    for j in range(q):
        if S[i] == T[j]:
            cnt = cnt + 1
            
print cnt

### FIXED CODE ###

n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

S.append(0)
cnt = 0
for i in range(q):
    j = 0
    S[n] = T[i]
    while S[j] != S[n]:
        j = j + 1
    if j != n:
        cnt = cnt + 1


print cnt