stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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;

  }

}


// Optimized solution to the same problem (faster):
#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;

  }

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

	}

		

}

// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef vector<int> vi;

typedef vector<ll> vl;

#define rep(i, n) for(ll i = 0;i < n;i++)

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

template<class T, class U> void cmax(T& a, U b) { if (a<b) a = b; }

template<class T, class U> void cmin(T& a, U b) { if (a>b) a = b; }



const ll MOD = 1e9+7;

const int MAX = 50000;



long long 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;

    }

}



long long 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() {

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



  int n, k;

  cin >> n >> k;



  COMinit();



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

    cout << COM(n-k+1, i) * COM(k-1, i-1) % MOD << endl;

  }

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef vector<int> vi;

typedef vector<ll> vl;

#define rep(i, n) for(ll i = 0;i < n;i++)

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

template<class T, class U> void cmax(T& a, U b) { if (a<b) a = b; }

template<class T, class U> void cmin(T& a, U b) { if (a>b) a = b; }



const ll MOD = 1e9+7;

const int MAX = 2000;



long long 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;

    }

}



long long 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() {

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



  int n, k;

  cin >> n >> k;



  COMinit();



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

    cout << COM(n-k+1, i) * COM(k-1, i-1) % MOD << endl;

  }

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<vector>



using namespace std;



int main(){

    int N, K;

    cin >> N >> K;

    long ans;

    const long mod = 1000000007; 



    int m = max(K-1, N-K+1);

    vector < vector <long> > dp(m+1, vector<long>(1,1));

    

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

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

            dp[i].emplace_back((dp[i-1][j-1] + dp[i-1][j]) % mod);

        }

        dp[i].emplace_back(1);

    }



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

        if(N-K < i-1) cout << 0 << endl;

        else cout << dp[K-1][i-1] * dp[N - K +1][i] % mod << endl;

    }

    

    return 0;

}

// Optimized solution to the same problem (faster):
#include<iostream>

#include<vector>



using namespace std;



long modinv(long a, long mod){

    if(a == 0){

        perror("0 division");

        exit(1);

    }

    if(a == 1 || a%mod == 0){

        return 1;

    }

    

    else{

        long MOD = mod;

        long d = 0;

        long n = 0;

        vector<long> c(0);

        while( d != 1 ){

            n++;

            c.emplace_back(mod / a);

            d = mod % a;

            mod = a;

            a = d;

        } 

        long x = d;

        long y = -c[n-1];

        long temp;

        for(int i=n-2; i >= 0; i--){

            temp = y;

            y = x - c[i] * y;

            x = temp;

        }

        if(y>=0) return y;

        else return y + MOD;

    }

}



int main(){

    int mod = 1000000007;



    long N, K;

    cin >> N >> K;



    long ans = N-K+1;

    cout << ans <<endl;

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

        ans = ans *(K-i+1) % mod * (N-K+2-i) %mod * modinv(i-1, mod)  %mod * modinv(i, mod) % mod;

        cout << ans%mod << endl;

    }

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
//#pragma GCC optimize(2)

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxnn=1e6+7;

const int mod=1e9+7;

const ll inf=1e18+7;

ll sum[maxnn];

void init()

{

    sum[1]=1ll;

    for(ll i=2;i<=100000;i++)

    {

        sum[i]=sum[i-1]*i;

        sum[i]%=mod;

    }

}

ll ksm(ll a,ll b)

{

    ll ans=1;

    while(b)

    {

        if(b&1)

            ans=(ans*a)%mod;

        a=(a*a)%mod;

        b>>=1;

    }

    return ans%mod;

}

ll ny(ll a,ll b)

{

    return a*ksm(b,mod-2)%mod;

}

ll c(ll n,ll m)

{

    if(n<m) return 0;

    if(m==0||n==m) return 1ll;

    return ny(sum[n],sum[n-m]*sum[m]%mod);

}

ll MOD(ll x)

{

    return (x+mod)%mod;

}

int main()

{

    ll n,k;

    init();

    scanf("%lld %lld",&n,&k);

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

    {

        //printf("%lld %lld\n",c(n-k+1,min(i,n-k+1)),c(k-1,min(i,n-k+1)-1));

        printf("%lld\n",MOD(c(n-k+1,i)*c(k-1,i-1)));

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

 

using namespace std;

 

const long long mod = 1e9 + 7ll ;

const int MAX = 5000 ;



long long modpower(long long a , long long b)

{

    if(b == 0)

        return 1ll ;

    long long x = modpower(a , b / 2ll) ;

    x = (x * x) % mod ;

    if(b & 1)

        return (x * a) % mod ;

    return (x % mod) ;

}

 

struct combination

{

    vector<long long>fact , inv ;

    combination(int sz) : fact(sz + 1) , inv(sz + 1)

    {

        fact[0] = 1ll ;

        inv[0] = 1ll ;

        for(long long i = 1 ; i <= sz ; ++i)

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

        inv[sz] = modpower(fact[sz] , mod - 2ll) ;

		for(long long i = sz-1; i >= 1; --i)

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

    }

    long long choose(int n , int k) const

    {

        if(k < 0 || n < k)

            return 0 ;

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

    }

};



int n , k ;

combination comb(MAX) ;



int main()

{

	ios_base::sync_with_stdio(0) ;

	cin.tie(0) ;

	cin>>n>>k ;

    int g = n-k ;

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

    {

        if(g < i)

        {

            cout<<0<<"\n" ;

            continue ;

        }

        long long x = comb.choose(k-1 , i) % mod ;

        long long y = comb.choose(i+2+g-i-1 , g-i) % mod ;

        x = (x * y) % mod ;

        cout<<x<<"\n" ;

    }

    return 0 ;

}		


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

#include <iomanip>

#include <algorithm>

#include <cmath>

#define REP(i, n) for (int i = 0; i < (n); ++i)

using namespace std;

using ll = long long;

using arr = vector<ll>;

constexpr ll MOD = 1000000007;

constexpr ll INF = 1LL << 60;

constexpr int MAX = 110000;

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

void init()

{

    fac[0] = inv[0] = finv[0] = 1;

    fac[1] = inv[1] = finv[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;

    }

}

long C(int n, int k)

{

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

        return 0;

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

}



ll n, b;



int main()

{

  cin >> n >> b;

  ll r = n - b;

  init();

  REP(i, b)

    cout << C(b - 1, i) * C(r - i + i + 1, i + 1) % MOD << '\n';

  return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

#include <vector>

#include <iomanip>

#include <algorithm>

#include <cmath>

#define REP(i, n) for (int i = 0; i < (n); ++i)

using namespace std;

using ll = long long;

using arr = vector<ll>;

constexpr ll MOD = 1000000007;

constexpr ll INF = 1LL << 60;

constexpr int MAX = 2020;

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

void init()

{

    fac[0] = inv[0] = finv[0] = 1;

    fac[1] = inv[1] = finv[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;

    }

}

long C(int n, int k)

{

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

        return 0;

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

}



ll n, b;



int main()

{

  cin >> n >> b;

  ll r = n - b;

  init();

  REP(i, b) {

    // 選ぶ場所 r+1Ci+1

    // 青の分け方 1こ以上、i+1このグループに分割 b-1Ci

    cout << C(r+1,i+1)*C(b-1,i) % MOD << '\n';

  }

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

    ll n,k;

    cin>>n>>k;

    init();





    ll red=n-k;

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

    {

        if(i>red+1)

        {

            cout<<0<<'\n';

            continue;

        }

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

        cout<<ans<<'\n';

    }





}


// Optimized solution to the same problem (faster):
#include <iostream>

using namespace std;



#define mod 1000000007

typedef long long ll;



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 facninv(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;

}



int main()

{  int n,k;

    ll ans;

   facninv(2001);

   cin>>n>>k;

   int r=n-k;

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

    if(r+1>=i)

    ans=(ncr(r+1,i)*ncr(k-1,i-1))%mod;

    else ans=0;

   cout<<ans<<endl;

   }



    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



#define DIV 1000000007



long long BLUE, RED;



vector<vector<long long> > comb;



void combination(int n)

{

	comb.assign(n+1, vector<long long>(n+1, 0));

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

		comb[i][0] = 1;

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

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

			comb[i][j] %= DIV;

		}

	}

}



long long cal(long long num){

	long long blue = comb[BLUE-1][num-1];

	long long red = comb[RED+1][num];

	return (blue*red)%DIV;

}



int main(){

	long long N, K;

	cin >> N >> K;

	BLUE=K;

	RED=N-K;

	combination(N+10);

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

		cout << cal(i) << endl;

	}

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;



#define DIV 1000000007



long long N, K;

long long kaidan[10000000];



void kaical(long long n){

	kaidan[0] = 1;

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

		kaidan[i] = kaidan[i-1] * i;

		kaidan[i] %= DIV;

	}

}



long long modpow(long long ori, long long po){

	long long res = 1;

	while(po > 0){

		if(po&1){

			res *= ori;

			res %= DIV;

		}

		ori *= ori;

		ori %= DIV;

		po >>= 1;

	}

	return res;

}



//nCk

long long combination(long long n, long long k){

	if(n == 0 && k == 0)return 1;

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

	long long n_kai = kaidan[n];

	long long k_kai = kaidan[k];

	long long nmk_kai = kaidan[n-k];



	long long ans = n_kai * modpow(k_kai, DIV - 2);

	ans %= DIV;

	ans *= modpow(nmk_kai, DIV-2);

	ans %= DIV;

	return ans;

}



int main(){

	cin >> N >> K;

	kaical(N + 5);

	

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

		long long b = combination(K-1, i-1);

		long long r = combination(N-K+1, i);

		cout << (b * r)%DIV << endl;

	}

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#include<cstdio>

#include<cstring>

using namespace std;

const int mm=1e9;

int mp[100010],n;

string s;

int main()

{

	ios::sync_with_stdio(false);

	cin>>s;

	int len=s.size(),res=0;

	memset(mp,0,sizeof mp);

	for(int i=0;i<len;i++)

	{

		if(s[i]=='R')

			res++;

		else if(s[i-1]!='L')

		{

			if(res&1)

			{

				mp[i]+=(res+1)/2;

				mp[i-1]+=(res+1)/2; 

			}

			else

			{

				mp[i]+=(res/2+1);

				mp[i-1]+=(res/2);

			}

			res=0;

		}

	}

	for(int i=len-1;i>=0;i--)

	{

		if(s[i]=='L')

			res++;

		else 

		{

			if(res&1)

			{

				mp[i]+=res/2;

				mp[i+1]+=res/2; 

			}

			else

			{

				mp[i]+=res/2;

				mp[i+1]+=(res-1)/2;

			}

			res=0;

		}

	}

	for(int i=0;i<len;i++)

		printf("%d ",mp[i]);

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <stdlib.h>

#include <iostream> 

#include <string> 

#include <cstring> 

#include <cstdio> 

using namespace std;

const int N = 1e7;

int ans[N];



int main() {

	ios::sync_with_stdio(0);

	string s;

		cin >> s;

		int n = s.length();

		int cnt = 0;

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

			if (s[i] == 'R') {

				if (s[i + 1] == 'R') {

					ans[i] = 0; 

					cnt++;

				}

				else {

						ans[i] = cnt / 2 + 1;

						ans[i + 1] = (cnt +1) / 2 + 1;

						cnt = 0;

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

							if (s[j] == 'L') {

								ans[j] = 0;

								cnt++;

							}

							else break;

						}

						ans[i] += (cnt + 1) / 2;

						ans[i + 1] += cnt / 2;

						i += cnt;

						cnt = 0;

					}

				}

			}

		

		cout << ans[0];

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

			cout << ' ' << ans[i];

		cout << '\n';

	

	 

	return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int g,nt,re[100007]={0};

    string q;

    cin>>q;

    for(g=nt=0;q[g];g++){

        if(q[g]=='R')nt++;

        else if(nt)re[g-1]=(nt+1)/2,re[g]=nt/2,nt=0;

    }

    for(g=q.length()-1,nt=0;g>=0;g--){

        if(q[g]=='L')nt++;

        else if(nt)re[g+1]+=(nt+1)/2,re[g]+=nt/2,nt=0;

    }

    for(g=0;g<q.length()-1;g++)

        printf("%d ",re[g]);

    printf("%d\n",re[g]);

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <string.h>

char a[100005];

int b[100005] = { 0 };

int main()

{

	int len, count = 0, max = 0, i, j, flag,x,y;

	char b = 0;

	scanf("%s", a);

	len = strlen(a);

	for (i = 0; i < len; i++)

	{

		if (a[i] == 'R' && a[i + 1] == 'L')

		{

			j = i - 1;

			flag = 1;

			x = y = 1;

			while (j >= 0 && a[j] == 'R')

			{

				if (flag == 1)

					y++;

				else x++;

				flag = 1 - flag;

				j--;

			}

			flag = 1;

			j = i + 2;

			while (j < len && a[j] == 'L')

			{

				if (flag == 1)

					x++;

				else y++;

				flag = 1 - flag;

				j++;

			}

			printf("%d %d ", x, y);

			i++;

		}

		else printf("0 ");

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<string>

using namespace std;



string s;

int a[100009];

int main()

{

	cin>>s;

	int len=s.length();

	int sum=0;

	for(int i=0;i<len;i++)

	{

		if(s[i]=='L')

		{

			a[i-1]+=(sum+1)/2;

			a[i]+=sum/2;

			sum=0;

		}

		else sum++;

	}	

	sum=0;

	for(int i=len-1;i>=0;i--)

	{

		if(s[i]=='R')

		{

			a[i+1]+=(sum+1)/2;

			a[i]+=sum/2;

			sum=0;

		}

		else sum++;

	}

	for(int i=0;i<len;i++)

	{

		cout<<a[i]<<" "; 

	}

	return 0;

} 

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <string.h>

#include <string.h>

char a[100005];

int b[100005] = { 0 };

int main()

{

	int len, count = 0, max = 0, i, j, flag,x,y;

	char b = 0;

	scanf("%s", a);

	len = strlen(a);

	for (i = 0; i < len; i++)

	{

		if (a[i] == 'R' && a[i + 1] == 'L')

		{

			j = i - 1;

			flag = 1;

			x = y = 1;

			while (j >= 0 && a[j] == 'R')

			{

				if (flag == 1)

					y++;

				else x++;

				flag = 1 - flag;

				j--;

			}

			flag = 1;

			j = i + 2;

			while (j < len && a[j] == 'L')

			{

				if (flag == 1)

					x++;

				else y++;

				flag = 1 - flag;

				j++;

			}

			printf("%d %d ", x, y);

			i++;

		}

		else printf("0 ");

	}

}

// Fastest known solution for this problem: