Harryxun/stf_run huggingface dataset:
n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())


def function():
    x = int(map_list[-1][0])
    y = int(map_list[-1][1])
    h = int(map_list[-1][2])

    for i in range(101):
        for j in range(101):
            cont_check = True
            H = abs(i - x) + abs(j - y) + h
            #print('base:',i, j, H)
        
            for data in map_list:
                x, y, h = map(int, data)
                #print('check:',i, j, H, abs(i - int(x)) + abs(j - int(y) + int(h)))
                if h != max(H - abs(i - x) - abs(j - y), 0):
                    cont_check = False
                    break
            if cont_check and H >= 1:
                return i, j, H
            
i, j, H = function()
print(i, j, H)

### FIXED CODE ###

n = int(input())
map_list = []
for _ in range(n):
    map_list.append(input().split())

def function():
    for i in range(101):
        if int(map_list[i][2]) > 0:
            x = int(map_list[i][0])
            y = int(map_list[i][1])
            h = int(map_list[i][2])
            break
        else:
            continue

    for i in range(101):
        for j in range(101):
            cont_check = True
            H = abs(x - i) + abs(y - j) + h
            
            for data in map_list:
                xx, yy, hh = map(int, data)
                if hh != max(H - abs(xx - i) - abs(yy - j), 0):
                    cont_check = False
                    break
            if cont_check:
                return i, j, H

i, j, H = function()
print(i, j, H)
N = int(input())
AB = []
for _ in range(N-1):
    AB.append([int(i) for i in input().split()])
from collections import defaultdict as ddict
import numpy as np
R_children = ddict(set)
R_parents = ddict(set)
for ab in AB:
    R_children[ab[0]].add(ab[1])
    R_parents[ab[1]].add(ab[0])
ans = [0] * (N-1)
for i in range(N-1):
    used = set()
    for parent in R_parents[AB[i][0]]:
        color = ans[np.where(np.array(AB)[:,1]==AB[i][0])[0][0]]
        if color != 0:
            used.add(color) 
    for child in R_children[AB[i][1]]:
        color = ans[np.where(np.array(AB)[:,1]==child)[0][0]]
        if color != 0:
            used.add(color) 
    for child in R_children[AB[i][0]]:
        color = ans[np.where(np.array(AB)[:,1]==child)[0][0]]
        if color != 0:
            used.add(color) 
    if used == set():
        ans[i] = 1
    else:
        ans[i] = min(set(range(1,max(used)+2)) - used)
print(max(ans))
for a in ans:
    print(a)


### FIXED CODE ###

N = int(input())
AB = [[]]*(N-1)
for i in range(N-1):
    AB[i] = list(map(int,input().split()))
from collections import defaultdict as ddict
from collections import deque
tree = ddict(list)
B = [0]*(N-1)
for i,ab in enumerate(AB):
    tree[ab[0]].append(ab[1])
    B[i] = ab[1]
# 各エッジの色を格納する変数の初期化
# C[0]は使わない
C = [0]*N
# 幅優先探索用のcue
Q = deque([1])
while Q:
    q = Q.popleft()
    c = 0
    for w in tree[q]:
        # 色をインクリメントした際に親の色とかぶったら更に1を加算する
        # 他は単純なインクリメント
        c += 1 + int(C[q-1] == c+1)
        # エッジの色を格納
        C[w-1] = c
        # 子供をcueに追加
        Q.append(w)
print(max(C))
for b in B:
    print(C[b-1])
n,p=map(int,input().split())
for i in range(1,100000):
  if p%(i**n)==0:
    x=i
print(x)​

### FIXED CODE ###

n,p=map(int,input().split())
t=int(p**(1/n))
x=1
if n<50:
  for i in range(t+1,0,-1):
    if p%(i**n)==0:
      x=i
      break
  print(x)
else:
  print(1)
a,v = map(int,input().split())
b,w=map(int,input().split())
t=int(input())

x=b-a
y=v-w

if y*t>x and x%y==0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a,v = map(int,input().split())
b,w=map(int,input().split())
t=int(input())

x=b-a
if x<0:
    x= -x
y=v-w

if y*t>=x:
    print("YES")
else:
    print("NO")
[n,m]=list(map(int,input().split()))
ab=[]
for i in range(m):
    ab.append(list(map(int,input().split())))

chizu=[[] for i in range(n+1)]
ans=[0]*(n+1)
ans[1]=-1

for i in range(m):
    chizu[ab[i][0]].append(ab[i][1])
    chizu[ab[i][1]].append(ab[i][0])

kaisu=[chizu[1]]
for i in chizu[1]:
    ans[i]=1

j=-1
counter=len(chizu[1])
while True:
    j+=1
    for now in kaisu[j]:#スタートからj距離の点たちについて操作
        kari=[]
        for i in chizu[now]:#ある点から隣り合う点決めていく
           if ans[i]==0:
                ans[i]=now
                kari.append(ans[i])
                counter+=1
        kaisu.append(kari)
    if counter>=n-1:
        break

print("Yes")
for i in range(2,n+1):
    print(ans[i])

### FIXED CODE ###

[n,m]=list(map(int,input().split()))
ab=[]
for i in range(m):
    ab.append(list(map(int,input().split())))

chizu=[[] for i in range(n+1)]
ans=[0]*(n+1)
ans[1]=-1

for i in range(m):
    chizu[ab[i][0]].append(ab[i][1])
    chizu[ab[i][1]].append(ab[i][0])

kaisu=[chizu[1]]
for i in chizu[1]:
    ans[i]=1

error=0
j=-1
counter=len(chizu[1])
while True:
    j+=1
    if len(kaisu)<=j:
        error=0
        break
    for now in kaisu[j]:#スタートからj+1距離の点たちについて操作
        kari=[]
        for i in chizu[now]:#ある点から隣り合う点決めていく
           if ans[i]==0:#未到達であれば
                ans[i]=now
                kari.append(i)
                counter+=1
        kaisu.append(kari)
    if counter==n-1:
        break

if error==0:
    print("Yes")
    for i in range(2,n+1):
        print(ans[i])
    

elif error==1:
    print("No")
n, m = map(int, input().split())
if n == 1: print(m)
else: print(max(i for i in range(2, 100050) if m % i == 0 and m / i >= n))


### FIXED CODE ###

n, m = map(int, input().split())
values = []

def pfac(n):
    values = [1, n]
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            values.append(i)
            values.append(n // i)
    return values


for i in pfac(m):
    if m % i == 0 and m / i >= n:
        values.append(i)
print(max(values))
#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import math

input = stdin.readline

N = int(input())

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

print(reduce(math.gcd, A))


### FIXED CODE ###

#ABC118C-MonstersBattleRoyale.py

from sys import stdin
from functools import reduce
import fractions

input = stdin.readline

N = int(input())

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

answer = reduce(fractions.gcd, A)
print(answer)
n, m = map(int, input().split())
h = list(map(int, input().split()))
pairs = [list(map(int, input().split())) for _ in range(m)]

ans = [-1] * n

for i in range(m):
    if h[pairs[i][0] - 1] < h[pairs[i][1] - 1]:
            ans[pairs[i][0] - 1] = 0
            if ans[pairs[i][1] - 1] != 0:
                ans[pairs[i][1] - 1] = 1
    else:
        if ans[pairs[i][0] - 1] !=0:
            ans[pairs[i][0] - 1] = 1
        ans[pairs[i][1] - 1] = 0      
    print(ans)
for i in range(n):
    if ans[i] == -1:
        ans[i] = 1
print(ans)
print(sum(ans))

### FIXED CODE ###

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

ans = [1] * n

for i in range(m):
    if h[pairs[i][0] - 1] < h[pairs[i][1] - 1]:
        ans[pairs[i][0] - 1] = 0
    elif h[pairs[i][0] - 1] == h[pairs[i][1] - 1]:
        ans[pairs[i][0] - 1] = 0
        ans[pairs[i][1] - 1] = 0 
    else:
        ans[pairs[i][1] - 1] = 0      

print(sum(ans))
n = int(input())
str_list = [input() for _ in range(n)]


a=0
b=0
c=0                
d=0                
                
for i in range(1, n):
    if str_list[i] == 'AC':
    	a += 1
    elif str_list[i] == 'WA':
    	b += 1
    elif str_list[i] == 'TLE':
    	c +=1
    else :
    	d +=1

print('AC x'+ a)
print('WA x'+ b)
print('TLE x'+ c)
print('RE x'+ d)


### FIXED CODE ###

n = int(input())
str_list = [input() for _ in range(n)]


a=0
b=0
c=0                
d=0                
                
for i in range(n):
    if str_list[i] == 'AC':
    	a += 1
    elif str_list[i] == 'WA':
    	b += 1
    elif str_list[i] == 'TLE':
    	c +=1
    else :
    	d +=1

print('AC x '+ str(a))
print('WA x '+ str(b))
print('TLE x '+ str(c))
print('RE x '+ str(d))
a,b=map(int ,raw_input().split())

if a<=b:
    print(a)
else:
    print(a-1)

### FIXED CODE ###

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

if a<=b:
    print(a)
else:
    print(a-1)
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
CB=[]
for i in range(M):
  B,C=map(int,input().split())
  CB.append([C,B])
CB.sort(reverse=True)

idx=0
for C,B in CB:
  for i in range(B):
    if A[idx]<C:
      A[idx]=C
      idx+=1
    else:
      break
print(sum(A))


### FIXED CODE ###

N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
CB=[]
for i in range(M):
  B,C=map(int,input().split())
  CB.append([C,B])
CB.sort(reverse=True)

idx=0
for C,B in CB:
  for i in range(B):
    if not idx>=len(A) and A[idx]<C:
      A[idx]=C
      idx+=1
    else:
      break
print(sum(A))
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
X = readline().decode().rstrip()

hoge = [pow(2, i) for i in range(N + 5)]
counts = [1 if i in hoge else -1 for i in range(N + 5)]

for i in range(N):
    cnt = X.count('1')

    tmp = 0
    X_ = list(X)
    m = 0
    if X[i] == "0":
        cnt += 1
        X_[i] = "1"
    else:
        X_[i] = "0"
        cnt -= 1

    X_ = "".join(X_)
    acc = 0
    for j, c in enumerate(X_[::-1]):
        if c == '1':
            acc += hoge[j]
    if acc > 2 * pow(10, 5):
        if acc % cnt == 0:
            print(1)
            continue
        else:
            acc %= cnt
            cnt = bin(acc).count('1')
            tmp += 1

    if counts[acc] != -1:
        print(counts[acc] + tmp)
    else:
        while True:
            if acc % cnt == 0:
                counts[acc] = 1
                print(counts[acc] + tmp)
                break
            elif counts[acc % cnt] != 0:
                counts[acc] = counts[acc % cnt] + 1
                print(counts[acc] + tmp)
                break

            acc %= cnt
            cnt = bin(acc).count('1')
            #print(acc, cnt)


### FIXED CODE ###

#! /usr/bin/env python3

import sys
import numpy as np
from functools import lru_cache
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)


@lru_cache(maxsize=None)
def f(x):
    if x == 0:
        return 0
    return f(x % bin(x).count('1')) + 1


N = int(readline())
X = readline().decode().rstrip()
X_ = int(X, 2)
X_cnt = X.count('1')
p1 = X_ % (X_cnt + 1)
m1 = X_ % (X_cnt - 1) if X_cnt > 1 else 0

for i in range(N):
    if X[i] == '0':
        cnt = X_cnt + 1
        acc = (p1 + pow(2, N - i - 1, cnt)) % cnt

    else:
        cnt = X_cnt - 1
        if cnt == 0:
            print(0)
            continue
        acc = (m1 - pow(2, N - i - 1, cnt)) % cnt
    print(f(acc) + 1)
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]
fibo = [1,1]
r = [a[0]-1]

for i in range(m-1):
    r.append((a[i+1]-a[i])-2)
    if a[i+1] - a[i] == 1:
        print(0)
        exit()

r.append(n-a[-1]-1)

for i in range(max(r)+2):
    fibo.append((fibo[-1]+fibo[-2])%1000000007)

ans = 1

for i in range(len(r)):
    ans = (fibo[r[i]] * ans)%1000000007

print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]
fibo = [1,1]
ans = 1

for i in range(n):
            fibo.append((fibo[-1]+fibo[-2])%1000000007)

if m:
    r = [a[0]-1]

    for i in range(m-1):
        r.append((a[i+1]-a[i])-2)
        if a[i+1]-a[i] == 1:
            print(0)
            exit()

    else:
        r.append(n-a[-1]-1)

        for i in range(len(r)):
            ans = (fibo[r[i]] * ans)%1000000007

        print(ans)
else:
    print(fibo[n])
n = int(input())
h = [int(a) for a in input().split()]

result = 0
for i in range(n):
    if all([h[j] <= h[i] for j in range(i)]):
        result += 1

print(result)


### FIXED CODE ###

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

c = max([a, b])

if c == a:
    d = max([a - 1, b])
else:
    d = max([a, b - 1])

result = c + d
print(result)
k=int(input())
A=[[1,1,1,1,1,1,1,1,1,1]]
for i in range(9):
    Ai=[]
    Ai.append(A[i][0]+A[i][1])
    for j in range(8):
        Ai.append(A[i][j]+A[i][j+1]+A[i][j+2])
    Ai.append(A[i][7]+A[i][8])
    A.append(Ai)
c=[]
for i in range(len(A)):
    c.append(sum(A[i][1:10]))

print(c)
l=1 #length of number
while k>c[l-1]:
    k=k-c[l-1]
    l+=1
seq=[]

n=1 
while k>A[l-1][n]:
    k=k-A[l-1][n]
    n+=1
seq.append(n)#head number

for i in range(l-1):
    if seq[i]==0:
        j=0
        while k>A[l-2-i][j]:
            k=k-A[l-2-i][j]
            j+=1
        seq.append(j)
    else:
        j=seq[i]-1
        while k>A[l-2-i][j]:
            k=k-A[l-2-i][j]
            j+=1        
        seq.append(j)

for i in range(len(seq)):
    print(seq[i],end="")

### FIXED CODE ###

import queue

k=int(input())

q=queue.Queue()

for i in range(9):
    q.put(i+1)

c=1

for i in range(k):
    c=q.get()
    b=c%10
    if b!=0:
        q.put(10*c+b-1)
    q.put(10*c+b)
    if b!=9:
        q.put(10*c+b+1)

print(c)
S = str.input()
T = str.input()
U = len(S)
V = len(T)
X = T - S
if T.startwith(S) and X = 1:
  print(Yes)
else:
  print(No)

### FIXED CODE ###

s = input()
t = input()
if s == t[:-1]:
  print('Yes')
else:
  print('No')
from scipy.special import comb
from sys import stdin

N = int(stdin.readline())
count1 = [0] * (N + 1)
count2 = [0] * (N + 1)
A = list(map(int, stdin.readline().split()))

B = list(set(A))

for b in B:
    num_of_b = A.count(b)
    if num_of_b > 2:
        count1[b] = comb(num_of_b, 2, exact=True)
        count2[b] = comb(num_of_b - 1, 2, exact=True)
    elif num_of_b == 2:
        count1[b] = 1


for a in A:
    ans = 0
    ans += sum(count1) - count1[a]
    ans += count2[a]
    print(ans)


### FIXED CODE ###

from sys import stdin

N = int(stdin.readline())
a_dict = {}
A = list(map(int, stdin.readline().split()))
for a in A:
    if a in a_dict:
        a_dict[a] += 1
    else:
        a_dict[a] = 1

sum_comb = 0
B = set(A)
for b in B:
    n = a_dict[b]
    sum_comb += n * (n - 1) // 2

for a in A:
    ans = sum_comb
    n = a_dict[a]
    ans -= n * (n - 1) // 2
    ans += (n - 1) * (n - 2) // 2
    print(ans)
a=[]
a=[int(x) for x in input().split()]

ans = list.index(0) + 1
print(ans)

### FIXED CODE ###

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

ans = a.index(0) + 1
print(ans)
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(raw_input())
# スペース区切りの整数の入力
a, b, c = map(int, raw_input().split())
sum = a+b+C
if sum = 17:
  	print "YES"
else 
	print "NO"

### FIXED CODE ###

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, raw_input().split())
sum = a+b+c
if sum == 17:
  print "YES"
else: 
  print "NO"
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
    print('NO')
else:
    elif 1 <= ((b - a) / (v - w)) <= t:

        print('YES')
    else:
        print('NO')

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
    print('NO')
else:
    if 1 <= (abs(b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')
a,b =map(int,input().split())
c = 1
for i in range(a-1):
  if (b-2*i)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

x = list(map(int,input().split()))
print (x.index(0)+1)
import sys
def m():
 d={};input()
 for e in sys.stdin:
  if'f'==e[0]:print(['no','yes'][e[5:]in d])
  else:d[e[7:]]=0
if'__main__'==__name__:m()import sys
def m():
 d={0};input()
 for e in sys.stdin:
  if'f'==e[0]:print(['no','yes'][e[5:]in d])
  else:d|={e[7:]}
if'__main__'==__name__:m()


### FIXED CODE ###

import sys
def m():
 d={};input()
 for e in sys.stdin:
  if'f'==e[0]:print(['no','yes'][e[5:]in d])
  else:d[e[7:]]=0
if'__main__'==__name__:m()
import numpy as np

N = int(input())
A = [int(a) for a in input().split()]


def pow_k(x, n):
    """
    O(log n)
    """
    if n == 0:
        return 1

    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x % 998244353
        x *= x % 998244353
        n //= 2

    return K * x % 998244353

if A[0] != 0:
    print(0)
    exit()
if A.count(0) != 1:
    print(0)
    exit()

k = max(A)

R = [1]
result = 1


for i in range(k):
    R.append(A.count(i + 1))
    A.remove(i + 1)

for j in range(k):
    result *= pow_k(R[j], R[j + 1])

    if result == 0:
        print(0)
        exit()

print(result % 998244353)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
k = max(A)

def pow_k(x, n):
    """
    O(log n)
    """
    if n == 0:
        return 1

    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x % 998244353
        x *= x % 998244353
        n //= 2

    return K * x % 998244353


R = [0] * (k + 1)
result = 1
for i in A:
    R[i] += 1

if A[0] != 0 or R[0] != 1:
    print(0)
    exit()

for j in range(k):
    result *= pow_k(R[j], R[j + 1])

    if result == 0:
        print(0)
        exit()

print(result % 998244353)
import sys
input = sys.stdin.readline

N,Q = map(int,input().split())
aLst = [[int(i) for i in input().split()] for _ in range(N-1)]
pLst = [[int(i) for i in input().split()] for _ in range(Q)]
to = [[]for _ in range(N+1)]

for a,b in aLst:
    to[a].append(b)
    to[b].append(a)

ps = [0]*(N+1)
for a,b in pLst:
    ps[a] += b

def dfs(v, i):
    for j in to[v]:
        if j == i:
            continue
        ps[j] += ps[v]
        dfs(j,v)

dfs(1,0)
print(' '.join(map(str, ps[1:])))


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N,Q = map(int,input().split())
aLst = [[int(x) for x in input().split()] for _ in range(N-1)]
pLst = [[int(x) for x in input().split()] for _ in range(Q)]

tmpLst = [[] for _ in range(N+1)]
for i, j in aLst:
    tmpLst[i].append(j)
    tmpLst[j].append(i)

ansLst = [0] * (N + 1)
for i,j in pLst:
    ansLst[i] += j

def dfs(v, p):
    for i in tmpLst[v]:
        if i == p:
            continue
        ansLst[i] += ansLst[v]
        dfs(i, v)


dfs(1, 0)

ans = ' '.join(map(str, ansLst[1:]))
print(ans)
A, B, N = map(int, input().split())
f = [int(A*x/B) - (A * int(x/B)) for x in range(N+1)]
print(max(f))

### FIXED CODE ###

K = int(input())
A, B = map(int, input().split())
judge = False
for i in range(A, B+1):
  if i % K == 0:
    print('OK')
    judge = True
    break
if not judge:
  print('NG')
N = int(input())
listH =  list(map(int, input().split()))
count_lr = 0
count_rl = 0
li_lr = []


for i in range(N-1):
    if listH[i] >= listH[i+1]:
        count_lr += 1
        li_lr.append(count_lr)
    else:
        count_lr = 0
        li_lr.append(count_lr)
        
print(max(li_lr))

### FIXED CODE ###

N = int(input())
listH =  list(map(int, input().split()))
val = 0
ans = 0

for i in range(N-1):
    if listH[i] >= listH[i+1]:
        val += 1
    else:
        val = 0
    ans = max(val,ans)
        
print(ans)
# https://note.nkmk.me/python-union-find/
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    def size(self, x):
        return -self.parents[self.find(x)]
    def same(self, x, y):
        return self.find(x) == self.find(y)
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
    def group_count(self):
        return len(self.roots())
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
uf = UnionFind(N)
ans = 0
for i in range(M):
    A, B = map(int, input().split())
    if not uf.same(A,B):
        ans += 1
    else:
        uf.union(A-1,B-1)
print(ans)

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    def size(self, x):
        return -self.parents[self.find(x)]
    def same(self, x, y):
        return self.find(x) == self.find(y)
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
    def group_count(self):
        return len(self.roots())
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
uf = UnionFind(N)
ans = 0
for i in range(M):
    A, B = map(int, input().split())
    uf.union(A-1,B-1)
print(uf.group_count()-1)
import math as mt
NK=input().split()
N=int(NK[0])
K=int(NK[1])
P=N-K

print(P+1)

for i in range(1,K):
    Q=(mt.factorial(N-K+1)*mt.factorial(K-1))//(mt.factorial(K-i-1)*mt.factorial(i)*mt.factorial(N-K-i)*mt.factorial(i+1))
    print(Q%int(1e9+7))


### FIXED CODE ###

import math as mt
NK=input().split()
N=int(NK[0])
K=int(NK[1])
P=N-K

print(P+1)


for i in range(1,K):
    if i<=N-K:
        Q=(mt.factorial(N-K+1)*mt.factorial(K-1))//(mt.factorial(K-i-1)*mt.factorial(i)*mt.factorial(N-K-i)*mt.factorial(i+1))
        print(Q%int(1e9+7))
    else:
        print(0)