//-------All power is within you,you can do Anything and Everything.---------//
 
    #include <bits/stdc++.h>
    using namespace std;
  
//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ M $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//
 
    #define pb push_back
    #define MP make_pair
    #define F first
    #define S second
    #define sc(x) scanf("%lld",&x)
    #define pf(x) printf("%lld\n",x)
    #define int long long
    #define all(x) x.begin(),x.end() 
    #define fo(i,a,b) for(int i=a;i<b;i++)
    #define rfo(i,b,a) for(int i=b;i>=a;i--)
    #define mem( a, val ) memset(a, val, sizeof( a ) )
    #define deci( x ) cout<<fixed<<setprecision( x );
    #define bitcount( x ) __builtin_popcountll( x )
    #define endl "\n" 
    
    #define XOX 
    
    typedef vector<int> vi;
    typedef pair<int,int> pi; 
    
    const int MOD =  1000000007 ;
    const int MAX = 2e6 + 7;
    const int INF = 1e15;
    const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
    const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
    
//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ DEB $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//
    
    #define deb(x) cout<<#x<<" "<<x<<endl;


//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ V $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//  
    
    int i,j,k,t,n,q,l,r,mid;

//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ F $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//

    string s;
    int cnt,maxi,cntl,cntr,pos;
    vector<string> v;
    vector<int> vrakh;
    int ans[MAX];

    void solve()
    {
        cin>>s;
        s=s+'R';
        n=s.size();
        fo(i,0,n)
        {
            if(s[i]=='L' && cntr)
            {
                vrakh.pb(i-1);
                vrakh.pb(i);
                cntr=0;
                cntl=1;
                // maxi=max(maxi,cntl);
            }
            else if(s[i]=='L')
            {
                cntl++;
                // maxi=max(maxi,cntl);
            }

            if(s[i]=='R' && cntl)
            {
                v.pb(s.substr(pos,i-pos));
                pos=i;
                cntl=0;
                cntr=1;
                // maxi=max(maxi,cntl);
            }
            else if(s[i]=='R')
            {
                cntr++;
            }
            maxi=max({maxi,cntl,cntr});
        }
        maxi=maxi-1;
        // debug(maxi);
        // for(auto x:v)deb(x)
        // for(auto x:vrakh)deb(x)
        pos=0;
        for(auto x:v)
        {
            int sz=x.size();
            if(x.size()%2==0)
            {
                ans[vrakh[pos++]]=x.size()/2;
                ans[vrakh[pos++]]=x.size()/2;
            }
            else
            {
                
                cnt=0;
                fo(i,0,sz)
                if(x[i]=='R')cnt++;

                if(cnt%2==0)
                {
                    ans[vrakh[pos++]]=x.size()/2;
                    ans[vrakh[pos++]]=x.size()/2+1;
                }
                else
                {
                    ans[vrakh[pos++]]=x.size()/2+1;
                    ans[vrakh[pos++]]=x.size()/2;
                }
            }

        }
        fo(i,0,n-1)
        cout<<ans[i]<<" ";


    }
    
//*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*//
//                          GAME STARTS FROM HERE                            //
 
    int32_t main() 
    {
    
        // int start,stop=clock();
        // cout<<"time:"<<(stop-start)/double(CLOCKS_PER_SEC)*1000<<endl;
        ios_base::sync_with_stdio(0);
        cin.tie(NULL);

        // sc(t);while(t--)
        // cin>>t;while(t--)
            solve();
    
        return 0;
    }

Measured memory_bytes: 4836