Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if i > n-k+1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if i > n-k+1:
        print(0)
    else:
        x = comb(k-1,i-1) % mod
        y = comb(n-k+1,i) % mod
        print(x*y % mod)


Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if i > n-k+1:
        print(0)
    else:
        x = comb(k-1,i-1) % mod
        y = comb(n-k+1,i)
        print(int(x*y) % mod)


Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if i > n-k+1:
        print(0)
    else:
        x = comb(k-1,i-1) % mod
        y = comb(n-k+1,n-k-i+1)
        print(int(x*y) % mod)


Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if i > n-k+1:
        print(0)
    else:
        x = cmb(k-1,k-i) % mod
        y = cmb(n-k+1,n-k-i+1)
        print(int(x*y) % mod)


Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    x = comb(k-1,k-i) % mod
    if n-k+1 >= i:
        y = comb(n-k+1,i) % mod
    elif i > n-k+1:
        y = 0
    print(int(x*y)%mod)

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    x = comb(k-1,k-i) % mod
    if n-k+1 >= i:
        y = comb(n-k+1,i) % mod
    elif: i > n-k+1
        y = 0
    print(int(x*y)%mod)

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def comb(n,r):
    return factorial(n) / (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    x = comb(k-1,k-i)
    if n-k+1 >= i:
        y = comb(n-k+1,i)
    else:
        y = 0
    print(int(x*y)%mod)

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def count_num(array):
    array = array.replace('r',' ')
    lst = array.split()
    return len(lst)

n,k = map(int,input().split()) 
ans_lst = []
seq = list('r'*(n-k)+'b'*k)
al = list(set(itertools.permutations(seq)))

for i in range(1,k+1):
    ans_lst.append(0)

for x in al:
    array = ''.join(x)
    num = count_num(array)
    ans_lst[num-1] += 1
    
for i in range(1,k+1):
    print(ans_lst[i-1]%(10**9+7))

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def count_num(array):
    array = array.replace('r',' ')
    lst = array.split()
    return len(lst)

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

ans_lst = []
text = 'r'*(n-k)+'b'*k
seq = list(text)
al = list(set(itertools.permutations(seq)))
for x in al:
    array = ''.join(x)
    num = count_num(array)
    ans_lst.append(num)

for i in range(1,k+1):
    print((ans_lst.count(i))%(10**9+7))

Fixed submission:
from math import factorial

n,k = map(int,input().split())
mod = 10**9+7

def cmb(n,r):
    return factorial(n) // (factorial(r) * factorial(n-r))

for i in range(1,k+1):
    if n-k+1 < i or k-1 < i-1:
        print(0)
    else:
        x = cmb(k-1,i-1) % mod
        y = cmb(n-k+1,i) % mod
        ans = (x*y) % mod
        print(int(ans))