stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

using namespace std;

typedef long long ll;

ll M = 1000000007LL;

ll inv(ll K) {

  ll A = M - 2;

  ll ret = 1;

  ll D = K;

  while (A > 0) {

    if (A % 2 == 1) {

      ret = (ret * D) % M;

    }

    D = (D * D) % M;

    A /= 2;

  }

  return ret;

}

ll F[2000005];

ll I[2000005];

int main() {

  ios::sync_with_stdio(false);

  ll r1, c1, r2, c2;

  cin >> r1 >> c1 >> r2 >> c2;

  ll ret = 0;

  F[0] = 1;

  I[0] = 1;

  for (ll i = 1; i <= r2+c2+1; i++) {

    F[i] = (F[i-1] * i) % M;

    I[i] = inv(F[i]);

  }

  for (ll i = c1; i <= c2; i++) {

    // sum(f(i+j, i)) = f(i+r2+1, i+1)

    // f(i+r2+1, i+1) = (i+r2+1)! / ((i+1)! * (r2)!)

    ll R = F[i+r2+1];

    //R = (R * inv(F[i+1])) % M;

    //R = (R * inv(F[r2])) % M;

    R = (R * I[i+1]) % M;

    R = (R * I[r2]) % M;

    // sum(f(i+j, i)) = f(r1, i+1)

    // f(i+r1, i) = (i+r1)! / ((i+1)! * (r1-1)!)

    ll L = F[i+r1];

    //L = (L * inv(F[i+1])) % M;

    //L = (L * inv(F[r1-1])) % M;

    L = (L * I[i+1]) % M;

    L = (L * I[r1-1]) % M;

    //cout << R << ' ' << L << endl;

    ret = (ret + R) % M;

    ret = ((ret - L) % M + M) % M;

  }

  cout << ret << endl;

}

// Faster C++ solution for the same problem (measured speedup: 2.9954612744444153x):
#include <iostream>

using namespace std;

typedef long long ll;

ll M = 1000000007LL;

ll inv(ll K) {

  ll A = M - 2;

  ll ret = 1;

  ll D = K;

  while (A > 0) {

    if (A % 2 == 1) {

      ret = (ret * D) % M;

    }

    D = (D * D) % M;

    A /= 2;

  }

  return ret;

}

ll F[2000005];

ll I[2000005];

int main() {

  ios::sync_with_stdio(false);

  ll r1, c1, r2, c2;

  cin >> r1 >> c1 >> r2 >> c2;

  ll ret = 0;

  F[0] = 1;

  for (ll i = 1; i <= r2+c2+1; i++) {

    F[i] = (F[i-1] * i) % M;

  }

  I[r2+c2+1] = inv(F[r2+c2+1]);

  for (ll i = r2+c2; i >= 0; i--) {

    I[i] = (I[i+1] * (i+1)) % M;

  }

  for (ll i = c1; i <= c2; i++) {

    // sum(f(i+j, i)) = f(i+r2+1, i+1)

    // f(i+r2+1, i+1) = (i+r2+1)! / ((i+1)! * (r2)!)

    ll R = F[i+r2+1];

    //R = (R * inv(F[i+1])) % M;

    //R = (R * inv(F[r2])) % M;

    R = (R * I[i+1]) % M;

    R = (R * I[r2]) % M;

    // sum(f(i+j, i)) = f(r1, i+1)

    // f(i+r1, i) = (i+r1)! / ((i+1)! * (r1-1)!)

    ll L = F[i+r1];

    //L = (L * inv(F[i+1])) % M;

    //L = (L * inv(F[r1-1])) % M;

    L = (L * I[i+1]) % M;

    L = (L * I[r1-1]) % M;

    //cout << R << ' ' << L << endl;

    ret = (ret + R) % M;

    ret = ((ret - L) % M + M) % M;

  }

  cout << ret << endl;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<string>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

const ll mod=1000000007;

ll r1,r2,c1,c2;

ll ans;

ll n;

ll fac[2000005],inv[2000005];

inline void read(ll &x)

{

	ll f;char c;

	for (f=1,c=getchar();c<'0'||c>'9';c=getchar()) if(c=='-') f=-1;

	for (x=0;c<='9'&&c>='0';c=getchar()) x=x*10+(c&15);x*=f;

}

inline ll qpow(ll a,ll b)

{

	ll rest=1;

	while(b)

	{

		if(b&1) rest=(rest*a)%mod;

		b>>=1;

		a=(a*a)%mod;

	}

	return rest;

}

inline ll C(ll n,ll m)

{

	return fac[n]*inv[m]%mod*inv[n-m]%mod;

}

inline ll mx(ll _x,ll _y)

{

	return _x>_y?_x:_y;

}

int main()

{

	read(r1);read(c1);read(r2);read(c2);

	n=mx(r2,c2)*2+1;

	fac[0]=1;

	for(ll i=1;i<=n;i++) 

		fac[i]=fac[i-1]*i%mod;

	inv[n]=qpow(fac[n],mod-2);

	for(ll i=n-1;i>=0;i--) 

		inv[i]=inv[i+1]*(i+1)%mod;

	for(ll i=r1;i<=r2;i++)

	{

		ans=(ans+(C(i+c2+1,i+1)-C(i+c1,i+1))%mod)%mod;

	}

	printf("%lld\n",(ans+mod)%mod);

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.167185303891032x):
#include <stdio.h>

#define N 2222222

#define M 1000000007

typedef long long LL;



LL f[N];



LL qpow(LL x, int y)

{

	if(!y) return 1;

	LL t = qpow(x, y >> 1);

	t = t * t % M;

	if(y & 1) t = t * x % M;

	return t;

}



LL S(int x, int y)

{

	LL ans = f[x + y + 2];

	ans = ans * qpow(f[y + 1], M - 2) % M;

	ans = ans * qpow(f[x + 1], M - 2) % M;

	return ans - 1;

}



int main() 

{

	int r1, c1, r2, c2, m, i, j;

	LL sum;

		

	scanf("%d%d%d%d", &r1, &c1, &r2, &c2);

	m = r2 + c2 + 2;

	for(i = 2, f[0] = f[j = 1] = 1; i <= m; j = i++){

		f[i] = f[j] * (LL)i % M;

	}

	sum = S(r2, c2) - S(r1 - 1, c2);

	if(sum < 0) sum += M;

	sum -= S(r2, c1 - 1);

	if(sum < 0) sum += M;

	sum += S(r1 - 1, c1 - 1);

	if(sum >= M) sum -= M;

	printf("%lld\n", sum);

		

	return 0;

}
// Slower C++ solution:
// writer: w33z8kqrqk8zzzx33

#include <bits/stdc++.h>

using namespace std;

 

#define iter(i, a, b) for(int i=(a); i<(b); i++)

#define rep(i, a) iter(i, 0, a)

#define rep1(i, a) iter(i, 1, (a)+1)

#define log(a) cerr<<"\033[32m[DEBUG] "<<#a<<'='<<(a)<<" @ line "<<__LINE__<<"\033[0m"<<endl

#define all(a) a.begin(), a.end()

#define fi first

#define se second

#define pb push_back

#define mp make_pair

 

using ll=long long;

using pii=pair<int, int>;

//#define int ll

const int MOD = 1000000007;



int fac[2000006], inv[2000006], invfac[2000006];



int calc(int r, int c) {

    // -1 + r+c+2 choose r+1

    return ((1ll * fac[r+c+2] * invfac[r+1] % MOD * invfac[c+1] % MOD) + MOD - 1) % MOD;

}



signed main() {

    ios_base::sync_with_stdio(false); cin.tie(0);

    int r1, c1, r2, c2; cin >> r1 >> c1 >> r2 >> c2;

    fac[0] = 1; invfac[0] = 1;

    inv[0] = 1; inv[1] = 1;

    rep1(i, r2+c2+2) {

        if(i != 1) inv[i] = 1ll * inv[MOD % i] * (MOD - MOD/i) % MOD;

        fac[i] = 1ll * fac[i-1] * i % MOD;

        invfac[i] = 1ll * invfac[i-1] * inv[i] % MOD;

    }

    cout << (4ll*MOD + calc(r2, c2) - calc(r1-1, c2) - calc(r2, c1-1) + calc(r1-1, c1-1)) % MOD << endl;

}




// Faster C++ solution for the same problem (measured speedup: 5.05790350030797x):
#include <stdio.h>

#define N 2222222

#define M 1000000007

typedef long long LL;



LL f[N];



LL qpow(LL x, int y)

{

	if(!y) return 1;

	LL t = qpow(x, y >> 1);

	t = t * t % M;

	if(y & 1) t = t * x % M;

	return t;

}



LL S(int x, int y)

{

	LL ans = f[x + y + 2];

	ans = ans * qpow(f[y + 1], M - 2) % M;

	ans = ans * qpow(f[x + 1], M - 2) % M;

	return ans - 1;

}



int main() 

{

	int r1, c1, r2, c2, m, i, j;

	LL sum;

		

	scanf("%d%d%d%d", &r1, &c1, &r2, &c2);

	m = r2 + c2 + 2;

	for(i = 2, f[0] = f[j = 1] = 1; i <= m; j = i++){

		f[i] = f[j] * (LL)i % M;

	}

	sum = S(r2, c2) - S(r1 - 1, c2);

	if(sum < 0) sum += M;

	sum -= S(r2, c1 - 1);

	if(sum < 0) sum += M;

	sum += S(r1 - 1, c1 - 1);

	if(sum >= M) sum -= M;

	printf("%lld\n", sum);

		

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <fstream>

#include <sstream>

#include <iomanip>

#include <algorithm>

#include <numeric>

#include <vector>

#include <string>

#include <set>

#include <map>

#include <queue>

#include <stack>

#include <climits>

#include <cmath>

#include <cstring>

#include <unordered_set>

#include <unordered_map>

using namespace std;



#define pb push_back

#define fst first

#define snd second



typedef long long ll;

typedef pair<int,int> pii;

template<typename T> using min_queue=priority_queue<T,vector<T>,greater<T>>;



const ll MOD=1e9+7;



int N,K;



inline ll pw(ll a, ll b) {

  a%=MOD;

  ll res=1;

  for(;b;b>>=1) {

    if (b&1) res=res*a%MOD;

    a=a*a%MOD;

  }

  return res;

}





ll fac[4020],ifac[4020];



inline ll choose(int a, int b) {

  if (b<0 || b>a) return 0;

  return fac[a]*ifac[b]%MOD*ifac[a-b]%MOD;

}



int main(){

  ios::sync_with_stdio(0);cin.tie(0);



  cin>>N>>K;



  fac[0]=ifac[0]=1;

  for(int i=1;i<=4001;i++) fac[i]=fac[i-1]*i%MOD, ifac[i]=pw(fac[i],MOD-2);



  for(int i=1;i<=K;i++) cout<<choose(K-1,i-1)*choose(N-K+1,i)%MOD<<endl;



  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.5885250677077942x):
#include<bits/stdc++.h>

using namespace std;

const int inf=7+1e9,maxn=5+2e4;

typedef unsigned long long ll;

ll dp[maxn];

ll qpow(ll a,ll p){

	ll ans=1,tmp=a;

	while(p){

		if(p&1)

			ans=ans*tmp%inf;

		tmp=tmp*tmp%inf;

		p>>=1;	

	}

	return ans;

}

ll C(ll m,ll n){

	return dp[n]*qpow(dp[m]*dp[n-m]%inf,inf-2)%inf;

}

int main(){

	ll n,k;

	cin>>n>>k;

	//BLUE:C(i-1,k-1);RED:C(i,n-k+1);T0TAL:C(i,k-1)*C(i,n-k+1)

	//5 3

	//1:C(0,2)*C(1,3)=3;2:C(1,2)*C(2,3)=2*3=6;C(2,2)*C(3,3)=1

	memset(dp,0,sizeof(dp));

	dp[0]=1;

	for(ll i=1;i<=2005;i++)

		dp[i]=dp[i-1]*i%inf;

	/*

	for(ll i=1;i<=2000;i++)

		cout<<"dp["<<i<<"]="<<dp[i]<<endl;		

	*/

	for(ll i=1;i<=k;i++){

		if(i-1>n-k)

			cout<<"0\n";

		else	

			cout<<C(i-1,k-1)*C(i,n-k+1)%inf<<endl;

	}

		

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define endl '\n'

#define f first

#define s second

#define point complex<double>

#define pi acos(-1)

#define ld long double

using namespace std;

typedef long long ll;

const int xd=1e6;

const ll mod=1e9+7;

double dot(point a,point b)

{

    return (conj(a)*b).real();

}

double cross(point a,point b)

{

    return (conj(a)*b).imag();

}





ll fact[1000006], inv[1000006];



ll fp(ll base, ll exp)

{

    if (exp == 0)

        return 1;

    ll ans = fp(base, exp / 2);

    ans = (ans * ans) % mod;

    if (exp % 2 != 0)

        ans = (ans * (base % mod)) % mod;

    return ans;

}



void calcFacAndInv(ll n)

{

    fact[0] = inv[0] = 1;

    for (ll i = 1; i <= n; i++)

    {

        fact[i] = (i * fact[i - 1]) % mod;

        inv[i] = fp(fact[i], mod - 2);

    }

}



ll ncr(ll n, ll r)

{

    return ((fact[n] * inv[r]) % mod * inv[n - r]) % mod;

}



ll npr(ll n, ll r)

{

    return (fact[n] * inv[n - r]) % mod;

}

int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(NULL);

calcFacAndInv(10000);

int n,b,r;

ll ansb,ansa;

cin>>n>>b;

r=n-b;

for(int i=1;i<=b;i++){

        if(r+1<i){

            cout<<0<<endl;

            continue;

        }

ansb=ncr(b-1,i-1)%mod;

ansa=ncr(r+1,i)%mod;

cout<<(ansb*ansa)%mod<<endl;;

}



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.434343221661405x):
#include<bits/stdc++.h>

using namespace std;

const int inf=7+1e9,maxn=5+2e4;

typedef unsigned long long ll;

ll dp[maxn];

ll qpow(ll a,ll p){

	ll ans=1,tmp=a;

	while(p){

		if(p&1)

			ans=ans*tmp%inf;

		tmp=tmp*tmp%inf;

		p>>=1;	

	}

	return ans;

}

ll C(ll m,ll n){

	return dp[n]*qpow(dp[m]*dp[n-m]%inf,inf-2)%inf;

}

int main(){

	ll n,k;

	cin>>n>>k;

	//BLUE:C(i-1,k-1);RED:C(i,n-k+1);T0TAL:C(i,k-1)*C(i,n-k+1)

	//5 3

	//1:C(0,2)*C(1,3)=3;2:C(1,2)*C(2,3)=2*3=6;C(2,2)*C(3,3)=1

	memset(dp,0,sizeof(dp));

	dp[0]=1;

	for(ll i=1;i<=2005;i++)

		dp[i]=dp[i-1]*i%inf;

	/*

	for(ll i=1;i<=2000;i++)

		cout<<"dp["<<i<<"]="<<dp[i]<<endl;		

	*/

	for(ll i=1;i<=k;i++){

		if(i-1>n-k)

			cout<<"0\n";

		else	

			cout<<C(i-1,k-1)*C(i,n-k+1)%inf<<endl;

	}

		

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define ll long long

const ll mod=1e9+7;

const int maxn=2e5+10;

ll inv[maxn];

ll fac[maxn];

ll power(ll base,ll n)

{

    ll r=1;

    while(n)

    {

        if(n&1) r=r*base%mod;

        base=base*base%mod;

        n/=2;

    }

    return r;

}

void init()

{

    fac[0]=1;

    for(int i=1;i<=2e5;i++)

    {

        fac[i]=fac[i-1]*i%mod;

    }

    inv[200000]=power(fac[200000],mod-2);

    for(int i=2e5;i>=1;i--)

    {

        inv[i-1]=inv[i]*i%mod;

    }

}

ll C(ll m,ll n)

{

    return fac[n]*inv[m]%mod*inv[n-m]%mod;

}



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);

    int n,k;

    cin>>n>>k;

    init();





    int red=n-k;

    for(int i=1;i<=k;i++)

    {

        if(i>red+1)

        {

            cout<<0<<'\n';

            continue;

        }

        int ans=(C(i,red+1)*C(i-1,k-1))%mod;

        cout<<ans<<'\n';

    }





}


// Faster C++ solution for the same problem (measured speedup: 4.256596242085977x):
#include <iostream>

#include <bits/stdc++.h>

#define p 1000000007

using namespace std;

int N,k;





const int A = 2e5 + 11;

const int B = 1e6 + 11;

const int inf = 0x3f3f3f3f;



inline int read() {

	char c = getchar(); int x = 0, f = 1;

	for( ; !isdigit(c); c = getchar()) if(c == '-') f = -1;

	for( ; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);

	return x * f;

}



int T, fac[A];



inline int power(long long a, long long  b) {

	long long res = 1;

	while (b) {

		if (b & 1) res = res * a % p;

		a = a * a % p, b >>= 1;

	}

	return res;

}



inline int C(int n, int m) {

	if (m > n) return 0;



	return (1LL*fac[n] * power(fac[m], p - 2) % p) *  power(fac[n - m], p - 2) % p;

}



inline int Lucas(int n, int m) {

	if (!m) return 1;

	//cout <<"CL:"<<C(n%p,m%p) << " "<<Lucas(n / p, m / p)<<endl;

	return C(n % p, m % p) * Lucas(n / p, m / p) % p;

}



inline void init() {

	int maxn = N*2;

	fac[0] = 1;

	for (int i = 1; i <= maxn; i++) fac[i] = (1LL*fac[i - 1] * i) % p;

}





int main()

{

    scanf("%d%d",&N,&k);

    long long b = k,r = N-k;

    init();



    for(int i=1;i<=k;++i)

    {

        long long i1 = 1,i2 = 1;

        if(r-i+1<0) {

            printf("0\n");continue;

        }

        i1 = Lucas(k-1,k-i);

        //cout << k << " "<<i<<" "<<i1 << endl;

        i2 = Lucas(r+1,r-i+1);

        //cout <<r+1<<" "<<r-i+1<<" "<<i2<<endl;

        printf("%lld\n",(1LL*i1*i2)%p);

    }

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define ll long long

const ll mod=1e9+7;

const int maxn=2e5+10;

ll inv[maxn];

ll fac[maxn];

ll power(ll base,ll n)

{

    ll r=1;

    while(n)

    {

        if(n&1) r=r*base%mod;

        base=base*base%mod;

        n/=2;

    }

    return r;

}

void init()

{

    fac[0]=1;

    for(int i=1;i<=2e5;i++)

    {

        fac[i]=fac[i-1]*i%mod;

    }

    inv[200000]=power(fac[200000],mod-2);

    for(int i=2e5;i>=1;i--)

    {

        inv[i-1]=inv[i]*i%mod;

    }

}

ll C(ll m,ll n)

{

    return fac[n]*inv[m]%mod*inv[n-m]%mod;

}



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);

    int n,k;

    cin>>n>>k;

    init();





    int red=n-k;

    for(int i=1;i<=k;i++)

    {

        if(i>red+1)

        {

            cout<<0<<'\n';

            continue;

        }

        int ans=(C(i,red+1)*C(i-1,k-1))%mod;

        cout<<ans<<'\n';

    }





}


// Faster C++ solution for the same problem (measured speedup: 2.820681043436097x):
#include <iostream>

#include <stdio.h>

#include <vector>

#include <map>

#include <unordered_map>

#include <set>

#include <unordered_set>

#include <stack>

#include <queue>

#include <algorithm>

#include <string.h>

#include <string>

#include <math.h>

#include <iomanip>

using namespace std;



#define SORT(v) sort((v).begin(), (v).end())

#define RSORT(v) sort((v).rbegin(), (v).rend())

#define pb push_back



typedef pair<int, int> pii;

typedef long long ll;

typedef unsigned long long ull;



const int mod = (int)1e9 + 7;

const int mod2 = 998244353;



ll exp(ll taban, ll us, ll md) {

    ll carpan = taban % md;

	if(carpan == 0) return 0;

    ll temp = us;

    ll res = 1;

    while(temp){

        if(temp % 2) res = (res*carpan) % md;

        temp /= 2;

        carpan = (carpan*carpan) % md;

    }

    return res;

}

 

ll ebob(ll a, ll b){

    if(!a)return b;

    return ebob(b%a, a);

}



ll ekok(ll a, ll b){

    return (a*b)/ebob(a, b);

}

ll mul(ll a, ll b, ll md){

	return a*b % md;

}

vector<ll> fact;

vector<ll> inv_fact;

void fact_init(int n){

	fact.resize(n+5);

	inv_fact.resize(n+5);

	fact[0] = inv_fact[0] = 1;

	for(int i = 1; i <= n; i++){

		fact[i] = (fact[i-1] * i) % mod;

		inv_fact[i] = exp(fact[i], mod-2, mod);

	}

}

ll komb(ll a, ll b){

	if(a < b) return 0;

	return fact[a] * (inv_fact[a-b] * inv_fact[b] % mod) % mod;

}

const int N = 500+5;



int main(){

	ios::sync_with_stdio(false); cin.tie(NULL);

	fact_init(2005);

	int n, k; cin>>n>>k;

	for(int i = 1; i <= k; i++){

		int ans = komb(k-1, i-1) * komb(n-k-(i-1) + i, i) % mod;

		cout<<ans<<"\n";

	}

}
// Slower C++ solution:
#include <algorithm>

#include <bitset>

#include <cassert>

#include <cmath>

#include <climits>

#include <cstdlib>

#include <iostream>

#include <map>

#include <numeric>

#include <queue>

#include <set>

#include <string>

#include <vector>

#define DEBUG 1

using namespace std;

constexpr int MOD = 1000000007;

typedef long long LL;



vector<long long> fact, fact_inv, inv;



void init_nCk(int SIZE) {

  fact.resize(SIZE + 5);

  fact_inv.resize(SIZE + 5);

  inv.resize(SIZE + 5);

  fact[0] = fact[1] = 1;

  fact_inv[0] = fact_inv[1] = 1;

  inv[1] = 1;

  for (int i = 2; i < SIZE + 5; i++) {

    fact[i] = fact[i - 1] * i % MOD;

    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;

    fact_inv[i] = fact_inv[i - 1] * inv[i] % MOD;

  }

}



long long nCk(int n, int k) {

  if (n < k) return 0;

  if (n < 0 || k < 0) return 0;

  return fact[n] * (fact_inv[k] * fact_inv[n - k] % MOD) % MOD;

}



int main() {

  int N, K; std::cin >> N >> K;

  init_nCk(1e5);

  for (int k = 1; k <= K; ++k) {

    std::cout << nCk(N - K + 1, k) * nCk(K - 1,  k - 1) % MOD << std::endl;

  }

}


// Faster C++ solution for the same problem (measured speedup: 5.949498703528259x):
#include <algorithm>

#include <bitset>

#include <cassert>

#include <cmath>

#include <climits>

#include <cstdlib>

#include <iostream>

#include <map>

#include <numeric>

#include <queue>

#include <set>

#include <string>

#include <vector>

#define DEBUG 1

using namespace std;

constexpr int kMod = 1000000007;

typedef long long LL;



vector<LL> fact, finv, inv;



void init_nCk(int N) {

  fact.resize(N + 1);

  finv.resize(N + 1);

  inv.resize(N + 1);

  fact[0] = fact[1] = 1;

  finv[0] = finv[1] = 1;

  inv[1] = 1;

  for (int i = 2; i <= N; i++) {

    fact[i] = fact[i - 1] * i % kMod;

    inv[i] = kMod - inv[kMod % i] * (kMod / i) % kMod;

    finv[i] = finv[i - 1] * inv[i] % kMod;

  }

}



LL nCk(int n, int k) {

  if (n < k) return 0;

  if (n < 0 || k < 0) return 0;

  return fact[n] * (finv[k] * finv[n - k] % kMod) % kMod;

}



int main() {

  int N, K; std::cin >> N >> K;

  init_nCk(N);

  for (int k = 1; k <= K; ++k) {

    std::cout << nCk(N - K + 1, k) * nCk(K - 1,  k - 1) % kMod << std::endl;

  }

}
// Slower C++ solution:
#include <iostream>

#include <vector>

using namespace std;



const int MOD = 1000000007;



int main() {

    int N, K;

    cin >> N >> K;



    vector<vector<long long>> C(N + 1, vector<long long>(N + 1));

    for (int i = 0; i <= N; i++) {

        C[i][0] = 1;

        C[i][i] = 1;

        for (int j = 1; j < i; j++) {

            C[i][j] = C[i - 1][j] + C[i - 1][j - 1];

            C[i][j] %= MOD;

        }

    }



    for (int i = 1; i <= K; i++) {

        if (N - K + 1 < i) {

            cout << 0 << endl;

            continue;

        }



        cout << (C[N - K + 1][i] * C[K - 1][i - 1]) % MOD << endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.842386877945137x):
#include <bits/stdc++.h>

using namespace std;



typedef long long ll;

const int MAX = 2001;

const int MOD = 1000000007;



ll fac[MAX], finv[MAX], inv[MAX];



void COMinit() {

    fac[0] = fac[1] = 1;

    finv[0] = finv[1] = 1;

    inv[1] = 1;

    for (int i = 2; i < MAX; i++) {

        fac[i] = fac[i - 1] * i % MOD;

        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;

        finv[i] = finv[i - 1] * inv[i] % MOD;

    }

}



ll COM(int n, int k) {

    if (n < k) return 0;

    if (n < 0 || k < 0) return 0;

    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;

}



int main() {

    int N, K;

    cin >> N >> K;



    COMinit();



    for (int i = 1; i <= K; i++) {

        if (N - K + 1 < i) {

            cout << 0 << endl;

            continue;

        };



        cout << (COM(N - K + 1, i) * COM(K - 1, i - 1)) % MOD << endl;

    }



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>



#define ll long long

#define fornum(A,B,C) for(A=B;A<C;A++)

#define mp make_pair

#define pii pair<int,int>

#define pll pair<ll,ll>



using namespace std;



/////////////////////////////////////////////////////

#define MOD ((ll)1e9+7)

ll N,K;

ll C[2020][2020];

ll i,j,ans;

int main(){

    scanf("%lld%lld", &N,&K);



    C[0][0]=1;

    fornum(i,0,N){

        C[i + 1][0] = 1;

        fornum(j,0,N){

            C[i + 1][j + 1] = (C[i][j] + C[i][j + 1]) % MOD;

        }

    }

    fornum(i,1,K+1){

        j = 0;

        printf("%lld\n", C[N-K + 1][i] * C[K - 1][i - 1] % MOD);

    }

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4088947131815583x):
#include<bits/stdc++.h>



#define ll long long

#define fornum(A,B,C) for(A=B;A<C;A++)

#define mp make_pair

#define pii pair<int,int>

#define pll pair<ll,ll>



using namespace std;



/////////////////////////////////////////////////////

#define MOD ((ll)1e9+7)

ll N,K;

ll F[202020];

ll i,j,ans;



ll moddiv(ll a,ll b){

    a %= MOD;

    b %= MOD;

    ll m = MOD - 2;

    while(m){

        if(m&1){

            a = (a * b) % MOD;

        }

        b = b * b%MOD;

        m /= 2;

    }

    return a;

}



int main(){

    scanf("%lld%lld", &N,&K);

    F[0] = 1;

    fornum(i,0,N){

        F[i + 1] = (F[i] * (i + 1)) % MOD;

        

    }

    fornum(i,1,K+1){

        if(N-K+1>=i)

            printf("%lld\n", moddiv(F[N-K+1],F[i]*F[N-K-i+1])*moddiv(F[K-1],F[i-1]*F[K-i]) % MOD);

        else

            printf("0\n");

    }

    

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

const int inf=7+1e9,maxn=5+2e4;

typedef unsigned long long ll;

ll dp[maxn];

ll qpow(ll a,ll p){

	ll ans=1,tmp=a;

	while(p){

		if(p&1)

			ans=ans*tmp%inf;

		tmp=tmp*tmp%inf;

		p>>=1;	

	}

	return ans;

}

ll C(ll m,ll n){

	return dp[n]*qpow(dp[m]*dp[n-m]%inf,inf-2)%inf;

}

int main(){

	ll n,k;

	cin>>n>>k;

	//BLUE:C(i-1,k-1);RED:C(i,n-k+1);T0TAL:C(i,k-1)*C(i,n-k+1)

	//5 3

	//1:C(0,2)*C(1,3)=3;2:C(1,2)*C(2,3)=2*3=6;C(2,2)*C(3,3)=1

	memset(dp,0,sizeof(dp));

	dp[0]=1;

	for(ll i=1;i<=2005;i++)

		dp[i]=dp[i-1]*i%inf;

	/*

	for(ll i=1;i<=2000;i++)

		cout<<"dp["<<i<<"]="<<dp[i]<<endl;		

	*/

	for(ll i=1;i<=k;i++){

		if(i-1>n-k)

			cout<<"0\n";

		else	

			cout<<C(i-1,k-1)*C(i,n-k+1)%inf<<endl;

	}

		

}

// Faster C++ solution for the same problem (measured speedup: 1.116638643167215x):
#include <bits/stdc++.h>

using namespace std;



const int mxn = 2003;

const long long mod = 1e9 + 7;



long long c[mxn][mxn];



int main() {



    int n, k;



    cin >> n >> k;



    c[0][0] = c[1][1] = c[1][0] = 1;

    for (int i = 2; i <= n; i++) {

        c[i][0] = c[i][i] = 1;

        for (int j = 1; j < i && j <= k; j++) {

            c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;

        }

    }

    for (int i = 1; i <= k; i++) {

        cout << (c[k - 1][i - 1] * c[n - k + 1][i]) % mod << endl;

    }



    return 0;

}