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 prob_d(n=None, k=None):
    if n is None and k is None:
        n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= (cmb(n - k + 1, i + 1) % div)
                ans = ans % div
                print(str(ans))

prob_d()

Fixed submission:
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 prob_d(n=None, k=None):
    if n is None and k is None:
        n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i + 1:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= (cmb(n - k + 1, i + 1) % div)
                ans = ans % div
                print(str(ans))


prob_d()

Buggy python submission (verdict: Runtime Error):
def prob_d(n=None, k=None):
    if n is None and k is None:
        n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= (cmb(n - k + 1, i + 1) % div)
                ans = ans % div
                print(str(ans))


prob_d()

Fixed submission:
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 prob_d(n=None, k=None):
    if n is None and k is None:
        n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i + 1:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= (cmb(n - k + 1, i + 1) % div)
                ans = ans % div
                print(str(ans))


prob_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 prob_d():
    n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= cmb(n - k + 1, i + 1) % div
                ans = ans % div
                print(str(ans))


prob_d()

Fixed submission:
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 prob_d(n=None, k=None):
    if n is None and k is None:
        n, k = [int(a) for a in input().split()]
    div = 10 ** 9 + 7
    for i in range(k):
        if n - k + 1 < i + 1:
            print("0")
        else:
            if k == 1:
                ans = cmb(n, i+1) % div
                print(str(ans))
            else:
                ans = cmb(k-1, i) % div
                ans *= (cmb(n - k + 1, i + 1) % div)
                ans = ans % div
                print(str(ans))


prob_d()