Buggy python submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
  print(ans)


Fixed submission:
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if i > N-K+1:
    print(0)
  else:
    ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
    print(ans)

Buggy python submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
  print(ans)


Fixed submission:
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if i > N-K+1:
    print(0)
  else:
    ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
    print(ans)

Buggy python submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  ans = combinations(red+1, i)*combinations(K-1, i-1)
  print(ans%(10**9+7))

Fixed submission:
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if i > N-K+1:
    print(0)
  else:
    ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
    print(ans)

Buggy python submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
blue = K
red = N-K
def permutations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // math.factorial(n - r)

for i in range(1,K+1):
  ans = permutations(red+1,i)
  print(ans%(10**9+7))

Fixed submission:
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if i > N-K+1:
    print(0)
  else:
    ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
    print(ans)

Buggy python submission (verdict: Runtime Error):
import math
N,K = map(int,input().split())
blue = K
red = N-K
def permutations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // math.factorial(n - r)

for i in range(1,K+1):
  ans = permutations(red+1,i)
  print(ans)

Fixed submission:
import math
N,K = map(int,input().split())
blue = K
red = N-K
def combinations(n, r):
  if n == r:
    return 1
  else:
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if i > N-K+1:
    print(0)
  else:
    ans = (combinations(red+1, i)*combinations(K-1, i-1))%(10**9+7)
    print(ans)