stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

  }

}


// Faster C++ solution for the same problem (measured speedup: 2.1016323437199715x):
#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;

  }

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 1.5674329119021437x):
#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;

}
// Slower C++ solution:
//#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;

}

// Faster C++ solution for the same problem (measured speedup: 1.5515732690649973x):
#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 ;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.5001693382583023x):
#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;

}
// 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);

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

    }





}


// Faster C++ solution for the same problem (measured speedup: 2.645285853385979x):
#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;

}
// Slower C++ solution:
#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;

	}

}


// Faster C++ solution for the same problem (measured speedup: 1.9633349223917729x):
#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;

	}

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 1.3926913475180587x):
#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;

}
// Slower C++ solution:
#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;

}

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

using namespace std;



int a[100005];



int main()

{

	string s;

	cin>>s;

	int cnt=0;

	for(int i=0; i<s.length(); i++)

	{

		if(s[i]=='R') cnt++;

		else a[i]=cnt, cnt=0;

	}

	for(int i=s.length()-1; i>=0; i--)

	{

		if(s[i]=='L') cnt++;

		else a[i]=cnt, cnt=0;

	}

	for(int i=0; i<s.length(); i++)

	{

		if(a[i]!=0 && s[i]=='R')

		{

			int temp=a[i]+a[i+1];

			if(temp%2==0) a[i]=temp/2, a[i+1]=a[i];

			else

			{

				temp/=2;

				if(a[i]%2==1) a[i]=temp, a[i+1]=temp+1;

				else a[i]=temp+1, a[i+1]=temp;

			}

		}

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

	}

}
// Slower C++ solution:
#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;

}

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

using namespace std;

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

#define ll long long

#define fastIO cout << fixed << setprecision(12), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)

double const EPS = 1e-12, PI = acos(-1);

const int N = 1e6 + 9, M = 1e3 + 9, OO = 1e9 + 7, MOD = 1e9 + 7;

const ll inf = 1e18;



int ans[N];



int main() {

  fastIO;

#ifdef LOCAL

  freopen("input.in", "rt", stdin);

#endif

  string str;

  cin >> str;

  vector<pair<char, int>> vv;

  char last = '?';

  int cnt = 0;

  for (int i = 0; i < (int)str.size(); ++i) {

    if(last == str[i]) {

      ++cnt;

    } else {

      if(last != '?')

        vv.push_back({last, cnt});

      last = str[i];

      cnt = 1;

    }

  }

  if(cnt > 0)

    vv.push_back({last, cnt});

  for (int i = 1; i < (int)vv.size(); ++i) {

    if(vv[i].first == 'L' && vv[i-1].first == 'R') {

      string str(vv[i-1].second - 1, '0');

      for(auto it: str)

        cout << it << ' ';

      cout << ((vv[i-1].second+1) / 2) + ((vv[i].second) / 2) << ' ';

      cout << ( (vv[i].second + 1) / 2) + (vv[i-1].second / 2) << ' ';

      str =  string(vv[i].second - 1, '0');

      for(auto it: str)

        cout << it << ' ';

      ++i;

    } else {

      string str(vv[i-1].second, '0');

      for(auto it: str)

        cout << it << ' ';

    }

  }

  return 0;

}
// Slower C++ solution:
#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;

}

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

#include <bits/stdc++.h>



using namespace std;

char str[100005];

int cnt[100005];



int main()

{

    scanf("%s",str);int len = strlen(str);

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

    {

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

            int j=0;

            while(str[i+j]!='L')++j;

            cnt[i+j-1] += j-j/2;

            cnt[i+j] +=j/2;

            i+=j;

        }else ++i;

    }



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

        if(str[i]=='L'){

            int j=0;

            while(str[i-j]!='R') ++j;

            cnt[i-j+1] += j-j/2;

            cnt[i-j]+= j/2;

            i-=j;

        }else --i;

    }



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

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

    }

    printf("\n");

    return 0;

}
// Slower C++ solution:
#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;

}

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

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

using namespace __gnu_pbds;



#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'

#define mset(d,val) memset(d,val,sizeof(d))

#define setp(x) cout<<fixed<<setprecision(x)

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

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

#define pb push_back

#define F first

#define S second

#define pqueue priority_queue

#define fbo find_by_order

#define ook order_of_key

typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<ll> vi;

typedef vector<ii> vii;

typedef long double ld;

typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;

void amin(ll &a, ll b){ a=min(a,b); }

void amax(ll &a, ll b){ a=max(a,b); }

void YES(){cout<<"YES\n";} void NO(){cout<<"NO\n";}

void SD(int t=0){ cout<<"PASSED "<<t<<endl; }

const ll INF = ll(1e18);

const int MOD = 998244353;



bool DEBUG=0;

const int MAXN = 100005;

const int LG = 21;



int prt[MAXN][LG];



int main()

{

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

	

	string s; cin>>s;

	int n=s.length();

	

	forn(i,0,n){

		if(s[i]=='L') prt[i][0]=i-1;

		else prt[i][0]=i+1;

	}

	

	forn(j,1,LG){

		forn(i,0,n){

			prt[i][j]=prt[prt[i][j-1]][j-1];

		}

	}

	

	int ans[n]{};

	forn(i,0,n){

		ans[prt[i][20]]++;

	}

	forn(i,0,n) cout<<ans[i]<<" ";

	

	return 0;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 5.255246699952107x):
#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 ");

	}

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

#include <iostream>

#include <cstring>

#include <cstdio>

using namespace std;



int a[100010]={0};



int main()

{

    char t;

    int n=-1;

    while(n++,(t=getchar())!='\n')if(t=='L')a[n]=-1;



    int cnt=0;

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

    {

        if(a[i]==0&&a[i+1]==0)

            cnt++;

        else if(a[i]==0&&a[i+1]==-1)

            a[i]=cnt+1,cnt=0;

    }

    cnt=0;

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

    {

        if(a[i]==-1&&a[i-1]==-1)

            cnt++;

        else if(a[i]==-1&&a[i-1]>0)

            a[i]=cnt+1,cnt=0;

    }

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

    {

        if(a[i]<=0)printf("0 ");

        else if(a[i+1]>0)

        {

            int num = a[i]+a[i+1];

            if((num&1)==0)printf("%d %d ",num>>1,num>>1);

            else if((a[i]&1)==0)

                printf("%d %d ",num>>1,(num>>1)+1);

            else printf("%d %d ",(num>>1)+1,num>>1);

            i++;

        }

    }

    printf("\n");

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.174114473804762x):
#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 ");

	}

}