Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print((int(factorial(k-1) * factorial(n-k+1)/factorial(i-1)/factorial(k-i)/factorial(i)/factorial(n-k+1-i))%((10**9)+7)))
  else:
    print(0)

Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print(int(factorial(k-1) * factorial(n-k+1)/factorial(i-1)/factorial(k-i)/factorial(i)/factorial(n-k+1-i))%((10**9)+7))
  else:
    print(0)


Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print(int((factorial(k-1) * factorial(n-k+1)/factorial(i-1)/factorial(k-i)/factorial(i)/factorial(n-k+1-i))%((10**9)+7)))
  else:
    print(0)

Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print(int(((factorial(k-1)) * (factorial(n-k+1))/(factorial(i-1))/(factorial(k-i))/(factorial(i))/(factorial(n-k+1-i)))%(10**9+7)))
  else:
    print(0)

Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1 >= i:
    print(int(((factorial(k-1)) * (factorial(n-k+1))/(factorial(i-1))/(factorial(k-i))/(factorial(i))/(factorial(n-k+1-i)))%(10**9+7)))
  else:
    print(0)


Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  if n-k+1-i >= i:
    print(int(((factorial(k-1)) * (factorial(n-k+1))/(factorial(i-1))/(factorial(k-i))/(factorial(i))/(factorial(n-k+1-i)))%(10**9+7)))
  else:
    print(0)

Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
n,k= map(int,input().split())
from math import factorial 
for i in range(1,k+1):
  print(((factorial(k-1)) * (factorial(n-k+1))/(factorial(i-1))/(factorial(k-i))/(factorial(i))/(factorial(n-k+1-i)))%(10**9+7))

Fixed submission:
import math
MOD = 10 ** 9 + 7

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


def f(n):
    return math.factorial(n)


for i in range(K):
    if N - K - i >= 0:
        print(f(N - K + 1) // f(N - K - i) // f(i + 1)
              * (f(K - 1) // f(K - i - 1) // f(i)) % MOD)
    else:
        print(0)