Harryxun/stf_run huggingface dataset:
import numpy as np

N = int(input())
A = list(map(int, input().split()))
# A.sort()

sosu = []
count = 0

def loop(target, A):
  global count
  B = []
  flg = True
  for i in range(len(A)):
    if A[i] % target != 0:
      B.append(A[i])
    if target % A[i] == 0:
      flg = False
  if flg:
    count+=1
  if len(B) == 1:
    count+=1
    return
  if len(B) == 0:
    return
  target = B.pop(0)
  loop(target, B)

target = A.pop(0)
loop(target, A)
print(count)

### FIXED CODE ###

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

m_a = max(A)+1
B = [0]*(m_a)

for i in A:
  B[i]+=1
  if B[i] == 1:
    for j in range(i*2, m_a, i):
      B[j]+=100
print(B.count(1))
N = int(input())
p = list()
l = 0

for n in range(0, N):
  p.append(list(map(int, input().split())))

for i in range(0, len(p)):
  for j in range(i+1, len(p)):
    l += math.sqrt((p[i][0] - p[j][0])**2 + (p[i][1] - p[j][1])**2)

n = math.factorial(N)
m = 2 * math.factorial(N-1)
print(l * m / n)

### FIXED CODE ###

import math

N = int(input())
x = [0] * N
y = [0] * N
l = 0

for i in range(N):
  x[i], y[i] = map(int, input().split())

for i in range(N):
  for j in range(i+1, N):
    l += math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

n = math.factorial(N)
m = 2 * math.factorial(N-1)
print(l * m / n)
A, B= map(int, input().split())
sum = 0
i=0
while i < 2:
    if A => B:
        sum += A
        A -= 1
    else:
        sum+= B
        B -= 1
    i +=1

print(sum)

### FIXED CODE ###

A, B= map(int, input().split())
sum = 0
i=0
while i < 2:
    if A >= B:
        sum += A
        A -= 1
    else:
        sum+= B
        B -= 1
    i +=1

print(sum)
a, b = map(input().split())
x = int(a+b)

if (int(x**0.5))**2 == x:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a, b = map(str, input().split())
x = int(a+b)

if (int(x**0.5))**2 == x:
    print("Yes")
else:
    print("No")
import fractions
from functools import reduce

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

#X=ak * (p+0.5) = ak/2 * (2p+1)

chk1 = True
chk2 = True
while chk1==True and chk2==True:
    cnt1=0
    for i in range(n):
        if a[i]%2==0:
            cnt1+=1
        a[i] /=2
    if n == cnt1:
        pass
    elif cnt1 ==0:
        chk2 = False
    else:
        chk1=False
    
if chk1 == False:
    print(0)
    exit()

b = lcm_list(a)

if b > m:
    print(0)
    exit()

c =(m+(b-1))//b 
print(int(c/2))

### FIXED CODE ###

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

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

import fractions

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

import math

lcm1 = 1
for i in a:
    lcm1 = lcm(lcm1, i)
    if((lcm1//i)%2==0):
        print(0)
        exit()

print(math.ceil((m//lcm1)/2))
K=int(input())
A,B=map(int,input().split())
#print(K,A,B)
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        sys.exit()
print("NG")

### FIXED CODE ###

import sys
K=int(input())
A,B=map(int,input().split())
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        sys.exit()
print("NG")
from scipy.sparse import*;f=lambda*z:map(int,input().split());n,=f();g,h=csgraph.dijkstra(csr_matrix(([1]*~-n,zip(*map(f,[0]*~-n))),[n+1]*2),0,[1,n]);print('FSennunkeec'[sum(g[i]>h[i]for i in range(n+1))*2/n::2])

### FIXED CODE ###

from scipy.sparse import*;f=lambda*z:map(int,raw_input().split());n,=f();a,b=zip(*map(f,[0]*~-n));g,h=csgraph.dijkstra(csr_matrix(([1]*~-n,(a,b)),[n+1]*2),0,[1,n]);print'FSennunkeec'[sum(g[i]>h[i]for i in range(n+1))*2>=n::2]
k = int(input()) # 500円玉の枚数
x = int(input()) # 総額

if (k*500 >= x):
    print('Yes')
else:
    print('No')



### FIXED CODE ###

k, x = map(int, input().split()) # 500円玉の枚数

if (k*500 >= x):
    print('Yes')
else:
    print('No')
l=[int(input()) for range(int(input())]
print(sum(l)-int(max(l)/2))                         

### FIXED CODE ###

n=int(input())
P=[int(input()) for i in range(n)]
print(sum(P)-max(P)+max(P)//2)
s=input()
t=input()
s=list(s)
t=list(t)
d=[]
for i in range(len(s)-len(t)):
    c=0
    for j in range(len(t)):
        if s[i+j]!=t[j]:
            c+=1
    d.append(c)
print(min(d))

### FIXED CODE ###

s=input()
t=input()
s=list(s)
t=list(t)
d=[]
c=0
if len(s)==len(t):
    for j in range(len(t)):
        if s[j]!=t[j]:
            c+=1
    d.append(c)
else:
    for i in range(len(s)-len(t)):
        c=0
        for j in range(len(t)):
            if s[i+j]!=t[j]:
                c+=1
        d.append(c)
print(min(d))
def show_list(a):
    for x in a:
        print x,
    print

def selection_sort(a,n):
    count=0
    for i in xrange(1,10):
        minj = i
        for j in xrange(i,n):
            if a[j]<a[minj]:
                minj = j
        tmp = a[i]
        a[i]=a[minj]
        a[minj]=tmp
        count+=1
    show_list(a)
    print count


def main():
    n = input()
    a = map(int,raw_input().split())
    selection_sort(a,n)


if __name__ == '__main__':
    main()

### FIXED CODE ###

def show_list(a):
    for x in a:
        print x,
    print

def selection_sort(a,n):
    count=0
    for i in xrange(n):
        minj = i
        for j in xrange(i,n):
            if a[j]<a[minj]:
                minj = j
        if minj!=i:  
            tmp = a[i]
            a[i]=a[minj]
            a[minj]=tmp
            count+=1
    show_list(a)
    print count


def main():
    n = input()
    a = map(int,raw_input().split())
    selection_sort(a,n)


if __name__ == '__main__':
    main()
n = int(input())
s=[]
alp = [chr(i) for i in range(97, 97+26)]
word = []
while n > 0:
    s.append(n % 26)
    n = n // 26
for m in s:
    if m == 0:
        word.append(z)
    else:
        word.append(alp[m - 1])
word.reverse()
print("".join(word))

### FIXED CODE ###

from collections import deque
n = int(input())
st  = deque()
while n > 0:
    num = (n - 1) % 26
    n = (n - 1) // 26
    st.appendleft(chr(num + 97))
print(*st, sep = "")
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = readInts()
ans = []
for i in reversed(range(n)):
    if A[i]:
        ans.append(i+1)
        tmp = 1
        n = i+1
        while tmp*tmp <= n:
            if n%tmp == 0:
                A[tmp-1] ^= 1
                if tmp != n//tmp:
                    A[n//tmp-1]^=1
            tmp += 1
if len(ans) > 0:
    print(len(ans))
    print(*ans)
else:
    print(0)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
A = readInts()
ans = []
for i in reversed(range(n)):
    if A[i]:
        ans.append(i+1)
        tmp = 1
        n = i+1
        while tmp*tmp <= n:
            if n%tmp == 0:
                A[tmp-1] ^= 1
                if tmp != n//tmp:
                    A[n//tmp-1]^=1
            tmp += 1
if len(ans) > 0:
    print(len(ans))
    print(*ans)
else:
    print(0)
N,K,M = input().split()
i = input().split() 
i2 = [int(s) for s in i]
score = sum(i2)
aim = int(N) * int(M)
d = aim - score
K = int(K)
if d > K:
    d = -1
elif 0 >=  d:
    d = 0
print(d)

### FIXED CODE ###

c = input()
list=["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"]
l = list.index(c) + 1
c = list[l]
print(c)
S=input()
List = list(S)
zeroNum = List.count("0")
oneNum = List.count("1")
res = min(reroNum,oneNum)
print(res*2)

### FIXED CODE ###

S=input()
List = list(S)
zeroNum = List.count("0")
oneNum = List.count("1")
res = min(zeroNum,oneNum)
print(res*2)
distances = list(map(int, input().split()))
distances.sort()
ans = 0
for i in range(2):
  ans += distances
print(ans)

### FIXED CODE ###

distances = list(map(int, input().split()))
distances.sort()
ans = 0
for i in range(2):
  ans += distances[i]
print(ans)
N=int(input())
H=list(map(int,input().split()))

if N==1:
    print('Yes')
else:
    for i in range(N-1):
        if H[N-i-2]>= H[N-i-1]+2:
            print('No')
            exit()
        elif H[N-i-2]==H[N-i-1]+1:
            H[[N-i-2]-=1
    
    for j in range(N-1):
        if  H[i]>H[i+1]:
            print('No')
            exit()
    print('Yes')
            

### FIXED CODE ###

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

if N==1:
    print('Yes')
else:
    for i in range(N-1):
        if H[N-i-2]>= H[N-i-1]+2:
            print('No')
            exit()
        elif H[N-i-2]==H[N-i-1]+1:
            H[N-i-2]-=1
    
    for j in range(N-1):
        if  H[i]>H[i+1]:
            print('No')
            exit()
    print('Yes')
n = int(input())
a = map(int, input().split())
print(sum(a)-len(a))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
print(sum(a)-len(a))
a = int(input())
b = int(input())
c = [i for i in range(1,4)]
for j in range(1,4):
    if c[j] != a and c[j] != b:
        print(int(c[j]))

### FIXED CODE ###

a = int(input())
b = int(input())
c = [i for i in range(1,4)]
for j in range(0,len(c)):
    if c[j] != a and c[j] != b:
        print(int(c[j]))
7 4 4
1 2
2 3
2 5
6 7
3 5
4 5
3 4
6 7

### FIXED CODE ###

import sys
fin = sys.stdin.readline
from collections import defaultdict

class UnionFind(object):
    def __init__(self, N):
        self.__root = list(range(N))
    

    def root(self, x):
        if self.__root[x] == x:
            return x
        else:
            # root abbreviation
            self.__root[x] = self.root(self.__root[x])
            return self.__root[x]

    
    def same(self, x, y):
        return self.root(x) == self.root(y)


    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if (x == y):
            return
        self.__root[x] = y
        return


N, K, L = [int(elem) for elem in fin().split(' ')]
road_list = tuple([tuple([int(elem)-1 for elem in fin().split(' ')]) for _ in range(K)])
train_list = tuple([tuple([int(elem)-1 for elem in fin().split(' ')]) for _ in range(L)])

uf_road = UnionFind(N)
uf_train = UnionFind(N)

for p, q in road_list:
    uf_road.unite(p, q)

for r, s in train_list:
    uf_train.unite(r, s)


key_list = []
count = defaultdict(int)
for i in range(N):
    # logN
    key = (uf_road.root(i), uf_train.root(i))
    key_list.append(key)
    count[key] += 1

assert len(key_list) == N
answer_list = [0] * N
for i, key in enumerate(key_list):
    answer_list[i] = str(count[key])
print(' '.join(answer_list))
s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = [""]

#print(dp)
for i in range(len(s)-1):
    if s[i+1] != "B":
        if dp[i] != "":
            dp[i+1] = dp[i] + s[i+1]
        else:
            dp[i+1] = s[i+1]
    else:
        if dp[i] != "":
            dp[i+1] = dp[i][:-1]
        else:
            dp[i+1] = ""
    #print(dp)
print(dp[len(s)-1])

### FIXED CODE ###

s = input()
ans = []
dp = [""]*(len(s))
if s[0] != "B":
    dp[0] = s[0]
else:
    dp[0] = ""

for i in range(len(s)-1):
    if s[i+1] != "B":
        dp[i+1] = dp[i] + s[i+1]
    else:
        dp[i+1] = dp[i][:len(dp[i])-1]
print(dp[len(s)-1])
S = input()
S = str(S)
flag = True

for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break
    
if flag == True:
    print ("Good")
else:
    print("Bad")



### FIXED CODE ###

S = raw_input()
flag = True
for i in range(3):
    if (S[i+1] == S[i]):
        flag = False
        break

if flag == True:
    print ("Good")
else:
    print("Bad")
s = list(input())
ans=[]

for i in s:
  if i == "0":
    ans.append("0")
  elif i == "1":
    ans.append("1")
  else:
    ans.pop()
    
print(ans,sep ="")

### FIXED CODE ###

s = list(input())
ans=[]

for i in s:
  if i == "0":
    ans.append("0")
  elif i == "1":
    ans.append("1")
  else:
    if len(ans) == 0: continue
    else: ans.pop()
    
print(*ans,sep ="")
X, Y, Z, K  = map(int, input().split())

A = sorted(list(map(int, input().split())), reverse=True)[:K]
B = sorted(list(map(int, input().split())), reverse=True)[:K]
C = sorted(list(map(int, input().split())), reverse=True)[:K]

R  = [sum([A[0], B[0], C[0]])]
Q  = {(0, 0, 1), (0, 1, 0), (1, 0, 0)}
D  = {(0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0)}
iS = [((a, b, c), sum([A[a], B[b], C[c]])) for a, b, c in Q]

while len(R) < K:
    iS = sorted(iS, key=lambda x: [x[1], x[0]], reverse=True)
    R.append(iS[0][1])
    abc     = iS[0][0]
    a, b, c = abc[0], abc[1], abc[2]
    iS      = iS[1:]
    if a + 1 < X:
        if not (a + 1, b, c) in D:
            iS.append(((a + 1, b, c), sum([A[a + 1], B[b], C[c]])))
            D.add(     (a + 1, b, c))
    if b + 1 < Y:
        if not (a, b + 1, c) in D:
            iS.append(((a, b + 1, c), sum([A[a], B[b + 1], C[c]])))
            D.add(    (a, b + 1, c))
    if c + 1 < Z:
        if not (a, b, c + 1) in D:
            iS.append(((a, b, c + 1), sum([A[a], B[b], C[c + 1]])))
            D.add(     (a, b, c + 1))

for r in R:
    print(r)


### FIXED CODE ###

X, Y, Z, K  = map(int, input().split())

A = sorted(list(map(int, input().split())), reverse=True)[:K]
B = sorted(list(map(int, input().split())), reverse=True)[:K]
C = sorted(list(map(int, input().split())), reverse=True)[:K]

R  = [sum([A[0], B[0], C[0]])]
Q  = {(0, 0, 1), (0, 1, 0), (1, 0, 0)}
D  = {(0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0)}
iS = [((a, b, c), sum([A[a], B[b], C[c]])) for a, b, c in Q if (a < X) and (b < Y) and (c < Z)]
iS = sorted(iS, key=lambda x: [x[1], x[0]], reverse=True)

while len(R) < K:
    R.append(iS[0][1])
    abc     = iS[0][0]
    a, b, c = abc[0], abc[1], abc[2]
    iS      = iS[1:]
    if a + 1 < X:
        if not (a + 1, b, c) in D:
            s = sum([A[a + 1], B[b], C[c]])
            is_done = False
            for i in range(len(iS)):
                if iS[i][1] < s:
                    iS = iS[:i] + [((a + 1, b, c), s)] + iS[i:]
                    is_done = True
                    break
            if is_done == False:
                iS = iS + [((a + 1, b, c), s)]
            D.add((a + 1, b, c))
    if b + 1 < Y:
        if not (a, b + 1, c) in D:
            s = sum([A[a], B[b + 1], C[c]])
            is_done = False
            for i in range(len(iS)):
                if iS[i][1] < s:
                    iS = iS[:i] + [((a, b + 1, c), s)] + iS[i:]
                    is_done = True
                    break
            if is_done == False:
                iS = iS + [((a, b + 1, c), s)]
            D.add((a, b + 1, c))
    if c + 1 < Z:
        if not (a, b, c + 1) in D:
            s = sum([A[a], B[b], C[c + 1]])
            is_done = False
            for i in range(len(iS)):
                if iS[i][1] < s:
                    iS = iS[:i] + [((a, b, c + 1), s)] + iS[i:]
                    is_done = True
                    break
            if is_done == False:
                iS = iS + [((a, b, c + 1), s)]
            D.add((a, b, c + 1))

for r in R:
    print(r)
s=list(int(input()))
k=int(input())
for i in range(len(s)):
  k-=s[i]*5(10**15)
  if k<s[i+1]:
    break
    
print(s[i+1])
    


### FIXED CODE ###

import sys
s=input()
k=int(input())
for i in range(len(s)):
    if s[i]!="1":
        print(s[i])
        sys.exit()
    if s[i]=="1" and i+1==k:
        print(1)
        sys.exit()
N = int(input())
A = list(map(int,input().split()))
C = [0]*N
a=0
def line(A,N):
    for i in range(N):
        C[A[i]] += 1
    if C[0] == 1:
        if N % 2==1:
            return pow(2,(N-1)//2)
        else:
            return 0
    for i in range(N):
        if C[i] != 2 and C[i]>=1:
            return 0
        elif C[i]==0:
            continue
    return pow(2,(N-1)//2)
a=line(A,N)
print(a%(pow(10,9)+7))


### FIXED CODE ###

L = list(input().split())
A=int(L[0])
B=int(L[2])
if L[1]=="+":
    print(A+B)
elif L[1]=="-":
    print(A-B)
a=int(input())
b=int(input())
ans=a*b
print(ans)

### FIXED CODE ###

n=input().split()
a=int(n[0])
b=int(n[1])
ans=a*b
print(ans)
ans = 0
pre_s = ''
for s in S:
    if s == pre_s:
        continue
    else:
        pre_s = s
        ans += 1
print(ans)

### FIXED CODE ###

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

ans = 0
pre_s = ''
for s in S:
    if s == pre_s:
        continue
    else:
        pre_s = s
        ans += 1
print(ans)
a,b=map(int,input()split())
print((a+b)//2)

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(math.ceil((a+b)/2))
A = int(input())
B = int(input())
 
answer = A - 2*B
if answer < 0:
  answer = 0
 
print(answer)

### FIXED CODE ###

A,B=map(int, input().split()) 
answer = A - 2*B
if answer < 0:
  answer = 0
 
print(answer)
import numpy as np

n,m = [int(i) for i in input().split()]

keiro = np.eye(n)
ab = []
for i in range(m):
  a,b = [int(i)-1 for i in input().split()]
  ab.append([a, b])
  keiro[a,b] = 1
  keiro[b,a] = 1

cnt = []
for i in range(m):
  cnt = 0
  a,b = ab[i]
  keiro[a,b] = 0
  keiro[b,a] = 0
  
  eig, p = np.linalg.eig(keiro)
  p_inv = np.linalg.inv(p)
  eig = eig**(m-i-1)
  d = np.diag(eig)
  keiro_tmp = np.dot(p,d)
  keiro_tmp = np.dot(keiro_tmp,p_inv)
  for j in range(0,n-1):
    for k in range(j+1,n):
      if keiro_tmp[j,k] == 0:
        cnt += 1
  print(cnt)

### FIXED CODE ###

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

def find_index(c,eld):
  if c in eld[c]:
    return(c,len(eld[c]))
  else:
    return(eld[c][0],len(eld[eld[c][0]]))
           
eld = []
for i in range(n):
  eld.append([i])
stat = eld
ans = [int(len(eld)*(len(eld)-1)/2)]

for a,b in ab[1:][::-1]:
#  print(eld)
  a_index,a_size = find_index(a,eld)
  b_index,b_size = find_index(b,eld)
#  print(a_index,b_index)
  if a_index == b_index:
    ans.append(ans[-1])
    continue
  else:
    next = a_size * b_size
    ans.append(ans[-1] - next)

  if a_size >= b_size:
    eld[a_index].extend(eld[b_index])
    for i in eld[b_index]:
      eld[i] = [a_index]
  else:
    eld[b_index].extend(eld[a_index])
    for i in eld[a_index]:
      eld[i] = [b_index]

for i in ans[::-1]:
  print(i)
input()
c = list(map(int, input().split()))
c.sort(reverse=True)
a = sum(c[::2])
b = sun(c[1::2])
print(a - b)

### FIXED CODE ###

input()
c = list(map(int, input().split()))
c.sort(reverse=True)
a = sum(c[::2])
b = sum(c[1::2])
print(a - b)
inport collections
n=int(input())
ans=0
s=["".join(sorted(input())) for _ in range(n)]
c=collections.Counter(s)
for i in set(s):
  a=c[s]
  ans+=a*(a-1)//2
print(ans)



### FIXED CODE ###

N=int(input())
dictionary={}
count=0
for i in range(N):
    s=tuple(sorted(input()))
    if s in dictionary:
        dictionary[s]+=1
        count+=dictionary[s]
    else:
        dictionary[s]=0
print(count)
s = input()
t = input()

result = []
for i in range(len(s)-len(t)):
    tmp = 0
    for j in range(i,len(t)+i):
        if s[j] == t[j-i]:

            tmp += 1
    result.append(tmp)

print(len(t)-max(result))


### FIXED CODE ###

s = input()
t = input()

result = []
for i in range(len(s)-len(t)+1):
    tmp = 0
    for j in range(i,len(t)+i):
        if s[j] == t[j-i]:

            tmp += 1
    result.append(tmp)

print(len(t)-max(result))
import math

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

# Nがとりうる最大値
L_M = X // A

if L_M < 1:
    print(0)
    exit()

if L_M >= 1 and (X - (int(math.log10(L_M)) + 1) * B) // A > 10 ** 9:
    print(10 ** 9)
    exit()

if L_M >= 1:
    while True:
        if A * L_M + B * (int(math.log10(L_M)) + 1) <= X:
            if L_M > 10 ** 9:
                print(10 ** 9)
            else:
                print(L_M)
            exit()
        elif L_M <= 0:
            print(0)
            exit()
        else:
            L_M -= 1
else:
    print(0)

### FIXED CODE ###

S = input()
if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
elif S == "SAT":
    print(1)
n = int(input())
v = list(map(int, input().split()))

ans = v[0]
for n in range(1, n):
  ans = (ans + v[i]) / 2.0
  
print(ans)

### FIXED CODE ###

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

v.sort()
ans = v[0]

for i in range(1, n):
  ans = (ans + v[i]) / 2.0
print(ans)
[N,K] = list(map(int,input().split()))
R = N-K
if N==K:
    print(1)
    for i in range(2,K+1):
        print(0)
elif K == 1:
    print(int((N-K+1)%(10**9+7)))
else:
    print(int((N-K+1)%(10**9+7)))
    for i in range(2,K+1):
        if i>R+1:
            print(0)
            continue
        C1 = 1
        bo = i-1
        shi = K-1
        while bo!=0:
            C1 *= shi/bo
            if C1 > 2*10**9+7:
                C1 = C1 - 2*10**9+7
            shi += -1
            bo += -1
        R2 = R - (i-1)
        C2 = 1
        bo = i
        shi = R2+i
        while bo!=0:
            C2 *= shi/bo
            if C2 > 2*10**9+7:
                C2 = C2 - 2*10**9+7
            shi += -1
            bo += -1
        print(int((C1*C2)%(10**9+7)))

### FIXED CODE ###

N,K = list(map(int,input().split()))
B = K
R = N-K

MAXN = 2000+5
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

for i in range(1,K+1):
    if (i>R+1) or (i-1>B-1):
        print(0)
    else:
        X = nCr(R+1, i, mod=p)
        Y = nCr(B-1, i-1, mod=p)
        print(X*Y%p)
def li():
    return [int(x) for x in input().split()]

from collections import defaultdict
import sys
sys.setrecursionlimit(10**6)

INF = 10 ** 60

G = defaultdict(list)

N, M = li()

for _ in range(M):
    x, y = li()
    G[x].append(y)

dp = [-1] * (10 ** 5)

def dfs(v):
    if dp[v] != -1:
        return dp[v]
    ret = 0
    for cv in G[v]:
        ret = max(ret, dfs(cv) + 1)
    dp[v] = ret
    return ret


ans = 0
for v in range(1, N+1):
    # print(dfs(v))
    ans = max(ans, dfs(v))

print(ans)

### FIXED CODE ###

def li():
    return [int(x) for x in input().split()]

from collections import defaultdict
import sys
sys.setrecursionlimit(10**6)

INF = 10 ** 60

G = defaultdict(list)

N, M = li()

for _ in range(M):
    x, y = li()
    G[x].append(y)

dp = [-1] * (10 ** 5 + 100)

def dfs(v):
    if dp[v] != -1:
        return dp[v]
    ret = 0
    for cv in G[v]:
        ret = max(ret, dfs(cv) + 1)
    dp[v] = ret
    return ret


ans = 0
for v in range(1, N+1):
    # print(dfs(v))
    ans = max(ans, dfs(v))

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

def using_sqrt(limit):
    n = 0
    for k in range(2, limit+1):
        factor = 0
        
        # 2以外の偶数は素数ではないので無視する
        if k % 2 == 0 and k != 2:
            continue
        
        # 繰り返しの上限を対象の平方根にする
        for divisor in range(2, math.floor(math.sqrt(k))+1):
            if k % divisor == 0:
                factor += 1
                
        if factor == 0:
            n += 1
            
    return n

for i in range(n):
    if m%using_sqrt(i)==0:
        ans=i
        break
for j in range(m):
    print(i+1,i+1+ans)

### FIXED CODE ###

n,m=map(int, input().split())
if m%2==1:
    for i in range(m//2):
        print(i+1,m-i)
    for i in range(m//2+1):
        print(m+i+1,2*m+1-i)
else:
    for i in range(m//2):
        print(i+1,m+1-i)
    for i in range(m//2):
        print(m+i+2,2*m+1-i)
from math import gcd

n = int(input())
A = list(map(int, input().split()))
L, R = [0] * (n + 1), [0] * (n + 1)

for i in range(1, n + 1):
    L[i] = gcd(L[i - 1], A[i - 1])

for i in range(n - 1, -1, -1):
    R[i] = gcd(R[i + 1], A[i])

ans = 0
#print(L, R)
for i in range(n):
    ans = max(ans, gcd(L[i], R[i + 1]))
print(ans)

### FIXED CODE ###

from fractions import gcd

n = int(input())
A = list(map(int, input().split()))
L, R = [0] * (n + 1), [0] * (n + 1)

for i in range(1, n + 1):
    L[i] = gcd(L[i - 1], A[i - 1])

for i in range(n - 1, -1, -1):
    R[i] = gcd(R[i + 1], A[i])

ans = 0
#print(L, R)
for i in range(n):
    ans = max(ans, gcd(L[i], R[i + 1]))
print(ans)