Buggy python submission (verdict: Runtime Error):
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(n - r)


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, min(i, abs(n - i)))
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()


Fixed submission:
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()

Buggy python submission (verdict: Runtime Error):
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(n - r)


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        # print(n, i, n - i)
        c = cmb(n, min(i, abs(n - i)))
        # c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()


Fixed submission:
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()

Buggy python submission (verdict: Runtime Error):
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(n - r)


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()


Fixed submission:
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()

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


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


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()


Fixed submission:
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()

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


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


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        # print(i ** (K - i))
        ans = cmb(n, i) * i ** (K - i) % mod
        print(ans)


if __name__ == '__main__':
    p_d()


Fixed submission:
from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()