Buggy python submission (verdict: Runtime Error):
[N,K] = list(map(int,input().split()))
R = N-K
if N==K:
    print(1)
    for i in range(2,K+1):
        print(0)
elif K == 1:
    print(int((N-K+1)%(10**9+7)))
else:
    print(int((N-K+1)%(10**9+7)))
    for i in range(2,K+1):
        if i>R+1:
            print(0)
            continue
        C1 = 1
        bo = i-1
        shi = K-1
        while bo!=0:
            C1 *= shi/bo
            if C1 > 2*10**9+7:
                C1 = C1 - 2*10**9+7
            shi += -1
            bo += -1
        R2 = R - (i-1)
        C2 = 1
        bo = i
        shi = R2+i
        while bo!=0:
            C2 *= shi/bo
            if C2 > 2*10**9+7:
                C2 = C2 - 2*10**9+7
            shi += -1
            bo += -1
        print(int((C1*C2)%(10**9+7)))

Fixed submission:
N,K = list(map(int,input().split()))
B = K
R = N-K

MAXN = 2000+5
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

for i in range(1,K+1):
    if (i>R+1) or (i-1>B-1):
        print(0)
    else:
        X = nCr(R+1, i, mod=p)
        Y = nCr(B-1, i-1, mod=p)
        print(X*Y%p)

Buggy python submission (verdict: Runtime Error):
[N,K] = list(map(int,input().split()))
R = N-K
if N==K:
    print(1)
    for i in range(2,K+1):
        print(0)
elif K == 1:
    print(int((N-K+1)%(10**9+7)))
else:
    print(int((N-K+1)%(10**9+7)))
    for i in range(2,K+1):
        if i>R+1:
            print(0)
            continue
        C1 = 1
        bo = i-1
        shi = K-1
        while bo!=0:
            C1 *= shi/bo
            shi += -1
            bo += -1
        R2 = R - (i-1)
        C2 = 1
        bo = i
        shi = R2+i
        while bo!=0:
            C2 *= shi/bo
            shi += -1
            bo += -1
        print(int((C1*C2)%(10**9+7)))

Fixed submission:
N,K = list(map(int,input().split()))
B = K
R = N-K

MAXN = 2000+5
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

for i in range(1,K+1):
    if (i>R+1) or (i-1>B-1):
        print(0)
    else:
        X = nCr(R+1, i, mod=p)
        Y = nCr(B-1, i-1, mod=p)
        print(X*Y%p)

Buggy python submission (verdict: Runtime Error):
[N,K] = list(map(int,input().split()))
R = N-K

print(int((N-K+1)%(10**9+7)))
for i in range(2,K+1):
    if i>R+1:
        print(0)
        continue
    C1 = 1
    bo = i-1
    shi = K-1
    while bo!=0:
        C1 *= shi/bo
        shi += -1
        bo += -1
    R2 = R - (i-1)
    C2 = 1
    bo = i
    shi = R2+i
    while bo!=0:
        C2 *= shi/bo
        shi += -1
        bo += -1
    print(int((C1*C2)%(10**9+7)))

Fixed submission:
N,K = list(map(int,input().split()))
B = K
R = N-K

MAXN = 2000+5
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

for i in range(1,K+1):
    if (i>R+1) or (i-1>B-1):
        print(0)
    else:
        X = nCr(R+1, i, mod=p)
        Y = nCr(B-1, i-1, mod=p)
        print(X*Y%p)

Buggy python submission (verdict: Runtime Error):
[N,K] = list(map(int,input().split()))
R = N-K

print(int((N-K+1)%(10**9+7)))
for i in range(2,K+1):
    if i>R+1:
        print(0)
    C1 = 1
    bo = i-1
    shi = K-1
    while bo>0:
        C1 *= shi/bo
        shi += -1
        bo += -1
    R2 = R - (i-1)
    C2 = 1
    bo = i
    shi = R2+i
    while bo>0:
        C2 *= shi/bo
        shi += -1
        bo += -1
    print(int((C1*C2)%(10**9+7)))

Fixed submission:
N,K = list(map(int,input().split()))
B = K
R = N-K

MAXN = 2000+5
p = 10**9+7
MOD = p
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % MOD)
def nCr(n, r, mod=MOD):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

for i in range(1,K+1):
    if (i>R+1) or (i-1>B-1):
        print(0)
    else:
        X = nCr(R+1, i, mod=p)
        Y = nCr(B-1, i-1, mod=p)
        print(X*Y%p)