Buggy python submission (verdict: Runtime Error):
n,k = (int(x) for x in input().split())
mod = 10**9 + 7
ans = n - k + 1
print(ans)
for i in range(1,k):
  ans = int(ans*(n-k+1-i)*(k-i)/(i*(i+1)))
  #ans = ans%mod
  print(ans%mod)
  

Fixed submission:
import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)

Buggy python submission (verdict: Runtime Error):
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, k):
  r1 = 1
  r2 = 1
  for i in range(0, k):
      r1 *= (n - i)
      r2 *= (i + 1)
  r = r1/r2
  return r

ans = fact(R+1, 1)*fact(K-1,0)
for i in range(1,K+1):
  print(int(ans)%mod)
  if N - K + 1 < i:
    ans = 0
  else:
    ans = ans*(R - i + 1)*(K - i)/(i + 1)/i
  


Fixed submission:
import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)

Buggy python submission (verdict: Runtime Error):
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, k):
  r1 = 1
  r2 = 1
  for i in range(0, k):
      r1 *= (n - i)
      r2 *= (i + 1)
  r = r1/r2
  return r

ans = fact(R+1, 1)*fact(K-1,0)
for i in range(1,K+1): 
  #ans = ans 
  print(int(ans)%mod)
  ans = ans*(R - i + 1)*(K - i)/(i + 1)/i
  


Fixed submission:
import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)

Buggy python submission (verdict: Runtime Error):
def fact(n, k):
  r1 = 1
  r2 = 1
  for i in range(0, k):
      r1 *= (n - i)
      r2 *= (i + 1)
  r = r1/r2
  return r

N,K = (int(x) for x in input().split())
R = N - K
mod = 1000000007

for i in range(1,K+1):
  tmp1 = fact(R+1, i)%mod
  tmp2 = fact(K-1, i-1)%mod
  ans = tmp1*tmp2%mod
  print(int(ans))


Fixed submission:
import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)

Buggy python submission (verdict: Runtime Error):
def fact(n, k):
  r1 = 1
  r2 = 1
  for i in range(0, k):
      r1 *= (n - i)
      r2 *= (i + 1)
  r = r1/r2
  return r

N,K = (int(x) for x in input().split())
R = N - K
mod = 1#0000007

for i in range(1,K+1):
  tmp1 = fact(R+1, i)  
  tmp2 = fact(K-1, i-1)
  ans = tmp1*tmp2%1000000007
  print(int(ans))


Fixed submission:
import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)