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

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if i > (n+1)//2:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)



Fixed submission:
import math

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if n-k < i-1:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)

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

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007

for i in range (1,k+1):
    cb=place(  i,  k-i  )
    cr=place(i+1,n-k-i+1)
    print(cb*cr%1000000007)


Fixed submission:
import math

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if n-k < i-1:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)

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

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n<1:
        return 0
    if n==1:
        return 1
    return int( math.factorial(n+x-1)/math.factorial(n-1)/math.factorial(x) % 1000000007)

for i in range (1,k+1):
    cb=place(  i,  k-i  )
    cr=place(i+1,n-k-i+1)
    cr=cr%1000000007
    print(cb*cr%1000000007)


Fixed submission:
import math

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if n-k < i-1:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)

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

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n<1:
        return 0
    if n==1:
        return 1
    return ( math.factorial(n+x-1)//math.factorial(n-1)//math.factorial(x) % 1000000007)

for i in range (1,k+1):
    cb=place(  i,  k-i  )
    cr=place(i+1,n-k-i+1)
    cr=cr%1000000007
    print(cb*cr%1000000007)


Fixed submission:
import math

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if n-k < i-1:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)

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

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n<1:
        return 0
    if n==1:
        return 1
    return ( math.factorial(n+x-1)//math.factorial(n-1)//math.factorial(x) % 1000000007)

for i in range (1,k+1):
    cb=place(  i,  k-i  )
    cr=place(i+1,n-k-i+1)
    cr=cr%1000000007
    print(cb*cr%1000000007)


Fixed submission:
import math

str=input()
n,k=int(str.split()[0]),int(str.split()[1])

def place(n,x):
    if n==1:
        return 1
    ans=1
    if n-1 < x:
        for i in range(x+1,n+x):
            ans*=i
        ans//=math.factorial(n-1)
    else:
        for i in range(n, n+x):
            ans*=i
        ans//=math.factorial(x)
    return ans%1000000007


for i in range (1,k+1):
    if n-k < i-1:
        print(0)
    else:
        cb=place(  i,  k-i  )
        cr=place(i+1,n-k-i+1)
        cr=cr%1000000007
        print(cb*cr%1000000007)