Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from scipy.misc import comb
import numpy as np

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

mod = int(10 ** 9 + 7)

for i in range(1, k + 1):
    if i > n - k + 1:
        print(0)
    else:
        print(int(np.ceil(comb(k - 1, i - 1))) * int(np.ceil(comb(n - k + 1, i))) % mod)

Fixed submission:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

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

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from scipy.misc import comb

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

mod = int(10 ** 9 + 7)

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

Fixed submission:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

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

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from scipy.misc import comb

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

mod = int(10 ** 9 + 7)

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

Fixed submission:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

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

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    if n - (k - 1) < 1:
        return 0
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

for i in range(1, k + 1):
    print(comb(k - 1, i - 1) * comb(n - k + 1, i) % mod)

Fixed submission:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

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

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

divisor = int(10 ** 9 + 7)

max_degree = max(n - k + 1, k - 1)
fact = [1 for _ in range(max_degree + 1)]
for i in range(1, max_degree + 1):
    fact[i] = fact[i - 1] * i


def calc_combination(n, k):
    if k == 0:
        return 1
    div = fact[k] * fact[n - k]
    return fact[n] // div


for i in range(1, k + 1):
    red_patterns = calc_combination(n - k + 1, i)
    if red_patterns > divisor:
        red_patterns %= divisor
    blue_patterns = calc_combination(k - 1, i - 1)
    if blue_patterns > divisor:
        blue_patterns %= divisor

    ans = red_patterns * blue_patterns
    if ans > divisor:
        ans %= divisor

    print(ans)

Fixed submission:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())

mod = int(10 ** 9 + 7)


def comb(n, k):
    res = 1
    for i in range(k):
        res *= n - i
    for i in range(k):
        res //= k - i
    return res

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