Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

N, K=map(int, input().split())
red=N-K

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


for i in range(1,K+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(ret%(1e9+7))

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

N, K=map(int, input().split())
red=N-K

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


for i in range(1,K+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(ret%(1e9+7))

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

N, K=map(int, input().split())
red=N-K

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

n = min(N-K+1,K)
for i in range(1,n+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(ret%(1e9+7))

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy python submission (verdict: Runtime Error):
N, K=map(int, input().split())
red=N-K

def cmb(n, r):
  m=1
  if(n==0 or r==0):
      return 1
  if(n<2*r):
      r=n-r
  for i in range(1,r+1):
      m=m*(n-i+1)/i
    
  return m

n = min(N-K+1,K)
for i in range(1,n+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(int(ret%(1e9+7)))

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy python submission (verdict: Runtime Error):
N, K=map(int, input().split())
red=N-K

def cmb(n, r):
  m=1
  if(n==0 or r==0):
      return 1
  if(n<2*r):
      r=n-r
  for i in range(1,r+1):
      m=m*(n-i+1)/i
    
  return m

n = (N-K+1)
if(n>K):
  n=K
for i in range(1,n+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(int(ret)%(10^9+7))
  

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)

Buggy python submission (verdict: Runtime Error):
N, K=map(int, input().split())
red=N-K

def cmb(n, r):
  m=1
  if(n==0 or r==0):
      return 1
  if(n<2*r):
      r=n-r
  for i in range(1,r+1):
      m=m*(n-i+1)/i
    
  return m

n = (N-K+1)
if(n>K):
  n=K
for i in range(1,n+1):
  ret = cmb(N-K+1,i)*cmb(K-1,i-1)
  print(int(ret)%(1000000007))

Fixed submission:
from operator import mul
from functools import reduce


def cmb(n, r):
	if n < r:
		return 0
	r = min(n - r, r)
	if r == 0:
		return 1
	numer = reduce(mul, range(n, n - r, -1))
	denom = reduce(mul, range(1, r + 1))
	return numer // denom % INF


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

for i in range(1, K + 1):
	print(cmb(K - 1, i - 1) * cmb(N - K + 1, i) % INF)