/***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) blesses with knowledge whom he wants."***/
/*** "ALHAMDULILLAH for Everything..." ***/
#include<bits/stdc++.h>
using namespace std;
#define  fastt       ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define  ll         long long
#define  debug      printf("Come here!")
#define  inf        1000000000000000000
#define  pb         push_back
#define  mp         make_pair
#define  sz(a)      a.size()
#define  mem(a,b)   memset(a,b,sizeof(a))
#define  clr(x)     x.clear()
#define  ff         first
#define  ss         second
#define  case(x)    cout << "Case " << x <<": "

#define  md         1000000007
#define  pi         acos(-1.0)
#define  cos(a)     cos(a*pi/180)
#define  sin(a)     sin(a*pi/180)
#define  tan(a)     tan(a*pi/180)
#define  cosi(a)    acos(a)/(pi/180)
#define  sini(a)    asin(a)/(pi/180)
#define  tani(a)    atan(a)/(pi/180)

#define  vl         vector <ll>
#define  vs         vector <string>
#define  vc         vector <char>
#define  vpll       vector < pair <ll, ll> >
#define  vpsl       vector < pair <string, ll> >
#define  vpls       vector < pair <ll, string> >
#define  pql        priority_queue<ll>
#define  minpql     priority_queue<ll,vector<ll>,greater<ll> >

#define  setbits(x)     __builtin_popcountll(x)
#define  zerobits(x)    __builtin_ctzll(x)

#define toll(a) atoll(a.c_str())
string tostr(ll a) {stringstream rr;rr<<a;return rr.str();}
ll pow(ll c,ll d){return d==0?:c*pow(c,d-1);}
ll gcd(ll a,ll b) {return b==0? a:gcd(b,a%b);}
ll lcm(ll a,ll b) {return ((a*b)/gcd(a,b));}

/* mpp.max_load_factor(0.25); mpp.reserve(1024); */
/* cout << fixed << setprecision(12);*/

int main()
{

    ll n, m, k, i, j, x, y, p=0, h, f=0;
    string s;
    cin>>s;
    k=s.size();
    ll a[k];
    for(i=0; i<s.size()-1; i++){
        if(s[i]=='R'){
            p++;
            if(s[i+1]=='R'){
                a[i]=0;
            }
            else{
                a[i]=p;
            }
        }
        else{
            p=0;
        }
    }
    p=0;
    for(i=s.size()-1; i>0; i--){
        if(s[i]=='L'){
            p++;
            if(s[i-1]=='L'){
                a[i]=0;
            }
            else{
                a[i]=p;
            }
        }
        else{
            p=0;
        }
    }

    for(i=0; i<k-1; i++){
        if(a[i]!=0){
            if((a[i]+a[i+1])%2==0){
                x=(a[i]+a[i+1])/2;
                a[i]=x;
                a[i+1]=x;
            }
            else{
                x=(a[i]+a[i+1])/2;
                if(a[i]<a[i+1]){
                    y=a[i+1]-1;
                    if(y%2==0){
                        a[i+1]=x+1;
                        a[i]=x;
                    }
                    else{
                        a[i]=x+1;
                        a[i+1]=x;
                    }
                }
                else{
                    y=a[i]-1;
                    if(y%2==0){
                        a[i]=x+1;
                        a[i+1]=x;
                    }
                    else{
                        a[i+1]=x+1;
                        a[i]=x;
                    }
                }
            }

            i++;
        }
    }
    for(i=0; i<k; i++){
        cout<<a[i]<<" ";
    }
    cout<<endl;

    return 0;
}



Measured memory_bytes: 4528