jiahuimbzuai/CoQuIR huggingface dataset:
//  [python]
# -*- coding: utf-8 -*-

def solve():
    S = input()
    res_l = []
    r,l = 0,1
    for i,s in enumerate(S+'R'):
        if s == 'R':
            if l:
                if res_l:
                    res_l[i-l] = r//2 + (l+1)//2
                    res_l[i-l-1] = (r+1)//2 + l//2

                r,l = 1,0
            else:
                r += 1
            res_l.append(0)
        else:
            l += 1
            res_l.append(0)

    res = ' '.join(list(map(str,res_l[:-1])))
    return str(res)

if __name__ == '__main__':
    print(solve())
//  [python]
def solve():
    s = input()
    ans_l = [1] * len(s)

    for i in range(len(s)-2):
        if s[i] == 'R' and s[i+1] == 'R':
            ans_l[i+2] += ans_l[i]
            ans_l[i] = 0

    for i in range(len(s)-1, 1, -1):
        if s[i] == 'L' and s[i-1] == 'L':
            ans_l[i-2] += ans_l[i]
            ans_l[i] = 0

    print(' '.join(map(str, ans_l)))


if __name__ == '__main__':
    solve()
//  [python]
S = input()
s = len(S)
shift = 10**100
K = shift.bit_length()

def db(A:list, k:int):
    dv = [[0]*s for _ in range(k+1)]
    dv[0] = A
    for kk in range(1,k+1):
        for n in range(s):
            dv[kk][n] = dv[kk-1][dv[kk-1][n]]
    return dv[k]

a = [1+n if i == "R" else n-1 for n,i in enumerate(S)]


for i in range(1,K):
    if (shift >> i)&1:
        a = db(a, i)
ans = [0]*s
for j in a:
    ans[j]+=1
print(*ans)
//  [python]
import numpy as np

S = input()
s = len(S)
shift = 10**100
K = shift.bit_length()

ini_ad = np.array([1 if i == "R" else -1 for i in S])

def db(A:list, k:int):
    dv = np.array([[0]*s for _ in range(k+1)])
    dv[0] = A
    for kk in range(1,k+1):
        for n in range(s):
            dv[kk][n] = dv[kk-1][dv[kk-1][n]]
    return dv[k]

a = list(range(s))+ini_ad
for i in range(1,K):
    if (shift >> i)&1:
        a = db(a, i)
ans = [0]*s
for j in a:
    ans[j]+=1
print(*ans)
//  [java]
import java.io.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        MyReader rd = new MyReader();        
        String S = rd.s();
        int N = S.length();
        int[] ans = new int[N];
        for(int i = 0; i < N;){
            int j = i;
            while(S.charAt(j) == 'R')
                j++;            
            int r = j-1;
            int l = j;
            while(j < N && S.charAt(j) == 'L')
                j++;            
            int rn = r-i+1;
            int ln = j-l;
            ans[r] = ((rn+1)>>1)+(ln>>1);
            ans[l] = (rn>>1)+((ln+1)>>1);            
            i = j;
        }
        StringBuilder sb = new StringBuilder();
        for(int a : ans)
            sb.append(a).append(" ");
        println(sb);
    }
    static void print(Object o){
        System.out.print(o.toString());
    }
    static void println(Object o){
        System.out.println(o.toString());
    }
    static int Int(String s){
        return Integer.parseInt(s);
    }
    static long Long(String s){
        return Long.parseLong(s);
    }
    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        long l() throws IOException{
            return Long(s());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
    }
}
//  [java]
import java.util.*;



public class Main {

    static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int point =0;
        int rCount =0;
        int lCount =0;
        boolean rCounting = true;
        int[] ans = new int[S.length];
        for(int i=0;i<S.length;i++){

            if(i>0 && S[i] == 'R' && S[i-1] == 'L'){
                ans[point-1] = (rCount +1)/2 + lCount/2;
                ans[point] = (lCount+1)/2 + rCount/2;
                rCounting = true;
                rCount = 1;
                lCount = 0;

            } else if(i>0 && S[i] == 'L' && S[i-1] == 'R'){
                point = i;
                rCounting = false;
                lCount = 1;


            } else {
                if(rCounting){
                    rCount++;
                } else {
                    lCount++;
                }

            }

            if(i == S.length-1) {
                ans[point] = (rCount +1)/2 + lCount/2;
                ans[point-1] = (lCount+1)/2 + rCount/2;
            }

        }

        for(int a: ans){
            System.out.print(a + " ");

        }


    }

}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int n = str.length;

		ArrayList<Integer> R = new ArrayList<>();
		ArrayList<Integer> L = new ArrayList<>();

		int a[] = new int[n];

		for (int i = 0; i < n - 1; i++) {
			if (str[i].equals("R") && str[i + 1].equals("L")) {
				R.add(i);
				L.add(i + 1);
				a[i] = 1;
				a[i + 1] = 1;
			}
		}

		Collections.sort(R);
		Collections.sort(L);

		Integer r[] = R.toArray(new Integer[R.size()]);
		Integer l[] = L.toArray(new Integer[L.size()]);

		for (int i = 0; i < n; i++) {
			if (R.contains(i) || L.contains(i)) {
				continue;
			}

			a[i] = 0;

			int min = Integer.MAX_VALUE;
			int index = 0;

			if (str[i].equals("R")) {
				int upper = ~Arrays.binarySearch(r, i, (x, y) -> x.compareTo(y) > 0 ? 1 : -1);
				index = R.get(upper);
				min = R.get(upper) - i;
			} else {
				int upper = ~Arrays.binarySearch(l, i, (x, y) -> x.compareTo(y) > 0 ? 1 : -1);
				index = L.get(upper - 1);
				min = i - L.get(upper - 1);
			}

			if (min % 2 == 0) {
				a[index]++;
			} else {
				if (str[i].equals("R"))
					a[index + 1]++;
				else
					a[index - 1]++;
			}
		}

		System.out.print(a[0]);
		for (int i = 1; i < n; i++) {
			System.out.print(" " + a[i]);
		}
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int n = str.length;

		ArrayList<Integer> R = new ArrayList<>();
		ArrayList<Integer> L = new ArrayList<>();

		int a[] = new int[n];

		for (int i = 0; i < n - 1; i++) {
			if (str[i].equals("R") && str[i + 1].equals("L")) {
				R.add(i);
				L.add(i + 1);
				a[i] = 1;
				a[i + 1] = 1;
			}
		}

		for (int i = 0; i < n; i++) {
			if (R.contains(i) || L.contains(i)) {
				continue;
			}

			a[i] = 0;

			int min = Integer.MAX_VALUE;
			int index = 0;

			if (str[i].equals("R")) {
				for (int j = 0; j < R.size(); j++) {
					if (R.get(j) > i) {
						if (min > R.get(j) - i) {
							min = R.get(j) - i;
							index = R.get(j);
						}
					}
				}
			} else {
				for (int j = 0; j < L.size(); j++) {
					if (L.get(j) < i) {
						if (min > i - L.get(j)) {
							min = i - L.get(j);
							index = L.get(j);
						}
					}
				}
			}

			if (min % 2 == 0) {
				a[index]++;
			} else {
				if (str[i].equals("R"))
					a[index + 1]++;
				else
					a[index - 1]++;
			}
		}

		System.out.print(a[0]);
		for (int i = 1; i < n; i++) {
			System.out.print(" " + a[i]);
		}
	}
}
//  [cpp]
//#include<bits/stdc++.h>
#include<cstdio>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int dm = 1 << 19;
char dn[dm], * di = dn;
inline void putint(int X) {
	if (X == 0) {
		*di++ = '0';
		*di++ = ' ';
		return;
	}
	int keta = 0;
	char C[20];
	while (X) {
		*(C + keta) = '0' + X % 10;
		X /= 10;
		keta++;
	}
	for (int i = keta - 1; i >= 0; i--)* di++ = (*(C + i));
	*di++ = ' ';
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	char S[100001];
	int N = fread_unlocked(S, 1, 100001, stdin);
	if (S[N - 1] == '\n') N--;
	int kotae[100000] = {};
	
	int k = 0;
	rep(i, N) {
		if (S[i] == 'R') {
			k++;
		}
		else {
			kotae[i - 1] += (k + 1) / 2;
			kotae[i] += k / 2;
			k = 0;
		}
	}
	k = 0;
	for (int i = N - 1; i >= 0; i--) {
		if (S[i] == 'L') {
			k++;
		}
		else {
			kotae[i + 1] += (k + 1) / 2;
			kotae[i] += k / 2;
			k = 0;
		}
	}

	rep(i, N) putint(kotae[i]);
	fwrite_unlocked(dn, di - dn - 1, 1, stdout);

	Would you please return 0;
}
//  [cpp]
#include <iostream>
#include <cstdio>
#include <cctype>
#include <cstring>
#define il inline
#define vd void
#define rg register
#define rep(i,x,y) for(rg int i=x;i<=y;++i)
#define drp(i,x,y) for(rg int i=x;i>=y;--i)
using namespace std;
const int Len=2333333;
char buf[Len],*p1=buf,*p2=buf,duf[Len],*q1=duf;
il char gc(); il int rd(); il vd pc(char c); il vd rt(int x); il vd flush();
int n,t,ans[100005];
char s[100005];
int main(){
    scanf("%s",s+1),n=strlen(s+1);
    rep(i,1,n){
        if(s[i]=='R') t=i;
        else{
            if((i-t)&1) ++ans[t+1];
            else ++ans[t];
        }
    }
    drp(i,n,1){
        if(s[i]=='L') t=i;
        else{
            if((t-i)&1) ++ans[t-1];
            else ++ans[t];
        }
    }
    rep(i,1,n) rt(ans[i]),pc(' ');
    return flush(),0;
}

il char gc(){return p1==p2&&(p2=(p1=buf)+fread(buf,1,Len,stdin),p1==p2)?-1:*p1++;}
il int rd(){char c;
    while(!isdigit(c=gc())&&c!='-');
    int f=c=='-'?c=gc(),1:0,x=c^48;
    while(isdigit(c=gc())) x=((x+(x<<2))<<1)+(c^48);
    return f?-x:x;
}
il vd pc(char c){q1==duf+Len&&fwrite(q1=duf,1,Len,stdout),*q1++=c;}
il vd rt(int x){x<0?pc('-'),x=-x:0,pc((x>=10?rt(x/10),x%10:x)+48);}
il vd flush(){fwrite(duf,1,q1-duf,stdout);}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main () {
	string s;
	cin >> s;
	int n = s.length();
	long long a[100000]={0};
	for (int i=1; i<n-1; i++) {
		if (s[i]=='R' && s[i+1]=='L') {
			int x=i;
			int r=0;
			while (x>=0 && s[x]=='R') {
				r++;
				x--;
			}
			a[i]+=ceil(1.0*r/2);
			a[i+1]+=floor(1.0*r/2);
			int l=0;
			x = i+1;
			while (x<=n && s[x]=='L') {
				l++;
				x++;
			}
			a[i+1]+=ceil(1.0*l/2);
			a[i]+=floor(1.0*l/2);
		}
	}
	for (int i = 0; i<n; i++) {
		cout << a[i] << " ";
	}
	return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main () {
	string s;
	cin >> s;
	int n = s.length();
	int a[100000]={0};
	for (int i=1; i<n-1; i++) {
		if (s[i]=='R' && s[i+1]=='L') {
			int x=i;
			int r=0;
			while (x>=0 && s[x]=='R') {
				r++;
				x--;
			}
			a[i]+=ceil(1.0*r/2);
			a[i+1]+=floor(1.0*r/2);
			int l=0;
			x = i+1;
			while (x<=n && s[x]=='L') {
				l++;
				x++;
			}
			a[i+1]+=ceil(1.0*l/2);
			a[i]+=floor(1.0*l/2);
		}
	}
	for (int i = 0; i<n; i++) {
		cout << a[i] << " ";
	}
	return 0;
}
//  [cpp]
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;

int main(){
    string s;
    cin >> s;

    long long n = s.size();
    long long i = 0;
    vector<long long> ans(n ,0);

    while(i < n){
        if(s[i] == 'R'){
            long long cnt_even = 0;
            long long cnt_odd = 0;
            long long right = i;
            while(i < n and s[i] == 'R'){
                if(i % 2 == 0) cnt_even++;
                else cnt_odd++;

                right = i;
                i++;
            }

            long long left = i;
            while(i < n and s[i] == 'L'){
                if(i % 2 == 0) cnt_even++;
                else cnt_odd++;
                i++;
            }

            if(n % 2 == 0){
                ans[right] = cnt_even;
                ans[left] = cnt_odd;
            }
            else{
                ans[right] = cnt_odd;
                ans[left] = cnt_even;
            }

        }
    }

    for(long long i = 0; i < n; i++){
        if(i == n-1) printf("%lld\n", ans[i]);
        else printf("%lld ", ans[i]);
    }
    return 0;
}
//  [c]
#include <stdio.h>

inline static int read_int() {
    int x = 0, k;
    while ((k = getchar_unlocked() - 'L') >= 0) x = x * 10 + k;
    return x;
}

inline static void put_int(int x) {
    int s = 0;
    char f[6] = {'0', '0', '0', '0', '0', '0'};
    if (!x) {
        putchar_unlocked('0');
        return;
    }
    while (x) {
        f[s++] += x % 10;
        x /= 10;
    }

    while (s--) putchar_unlocked(f[s]);
}

int main() {
    int flag = 0, l = 0, r = 0, i = 0, tmp, first = 1;

    for (;(tmp = getchar_unlocked() - 'L') >= 0; i++) {
        if (tmp) {
            // if c is R
            if (flag) {
                flag = 0;

                if ((tmp = r + 1) < l) {
                    if (first) {
                        first = 0;
                    } else {
                        putchar_unlocked(' ');
                    }
                    putchar_unlocked('0');

                    for (tmp++; tmp < l; tmp++) {
                        putchar_unlocked(' ');
                        putchar_unlocked('0');
                    }
                }

                if (first) {
                    first = 0;
                } else {
                    putchar_unlocked(' ');
                }
                tmp = (l - r + 1) / 2 + (i - l) / 2;
                put_int(tmp);
                putchar_unlocked(' ');
                tmp = (i - r) - tmp;
                put_int(tmp);

                for (tmp = l + 1; tmp < i; tmp++) {
                    putchar_unlocked(' ');
                    putchar_unlocked('0');
                }
                r = i;
            }
        } else {
            // if c is L
            if (!flag) {
                flag = 1;
                l = i;
            }
        }
    }

    if ((tmp = r + 1) < l) {
        if (first) {
            first = 0;
        } else {
            putchar_unlocked(' ');
        }
        putchar_unlocked('0');

        for (tmp++; tmp < l; tmp++) {
            putchar_unlocked(' ');
            putchar_unlocked('0');
        }
    }

    if (first) {
        first = 0;
    } else {
        putchar_unlocked(' ');
    }
    tmp = (l - r + 1) / 2 + (i - l) / 2;
    put_int(tmp);
    putchar_unlocked(' ');
    tmp = (i - r) - tmp;
    put_int(tmp);

    for (tmp = l + 1; tmp < i; tmp++) {
        putchar_unlocked(' ');
        putchar_unlocked('0');
    }

    putchar_unlocked('\n');
}
//  [c]
#include <stdio.h>

inline static int read_int() {
    int x = 0, k;
    while ((k = getchar_unlocked() - 'L') >= 0) x = x * 10 + k;
    return x;
}

inline static void put_int(int x) {
    int s = 0;
    char f[6] = {'0', '0', '0', '0', '0', '0'};
    if (!x) {
        putchar_unlocked('0');
        return;
    }
    while (x) {
        f[s++] += x % 10;
        x /= 10;
    }

    while (s--) putchar_unlocked(f[s]);
}

int main() {
    int flag = 0, l = 0, r = 0, i = 0, tmp, first = 1;

    for (;(tmp = getchar_unlocked() - 'L') >= 0; i++) {
        if (tmp) {
            // if c is R
            if (flag) {
                flag = 0;

                for (tmp = r + 1; tmp < l; tmp++) {
                    if (first) {
                        first = 0;
                    } else {
                        putchar_unlocked(' ');
                    }
                    putchar_unlocked('0');
                }

                if (first) {
                    first = 0;
                } else {
                    putchar_unlocked(' ');
                }
                tmp = (l - r + 1) / 2 + (i - l) / 2;
                put_int(tmp);
                putchar_unlocked(' ');
                tmp = (i - r) - tmp;
                put_int(tmp);

                for (tmp = l + 1; tmp < i; tmp++) {
                    putchar_unlocked(' ');
                    putchar_unlocked('0');
                }
                r = i;
            }
        } else {
            // if c is L
            if (!flag) {
                flag = 1;
                l = i;
            }
        }
    }

    for (tmp = r + 1; tmp < l; tmp++) {
        if (first) {
            first = 0;
        } else {
            putchar_unlocked(' ');
        }
        putchar_unlocked('0');
    }

    if (first) {
        first = 0;
    } else {
        putchar_unlocked(' ');
    }
    tmp = (l - r + 1) / 2 + (i - l) / 2;
    put_int(tmp);
    putchar_unlocked(' ');
    tmp = (i - r) - tmp;
    put_int(tmp);

    for (tmp = l + 1; tmp < i; tmp++) {
        putchar_unlocked(' ');
        putchar_unlocked('0');
    }

    putchar_unlocked('\n');
}
//  [c]
#include <stdio.h>
#include <wchar.h>

inline static void put_int(int x) {
    int s = 0;
    char f[6] = {'0', '0', '0', '0', '0', '0'};
    while (x) {
        f[s++] += x % 10;
        x /= 10;
    }

    while (s--) putc_unlocked(f[s], stdout);
}

int main() {
    int flag = 0, l = 0, r = 0, i = 0, tmp, first = 1;

    for (;(tmp = getchar_unlocked() - 'L') >= 0; i++) {
        if (tmp) {
            // if c is R
            if (flag) {
                flag = 0;

                if ((tmp = r + 1) < l) {
                    if (first) {
                        first = 0;
                    } else {
                        putchar_unlocked(' ');
                    }
                    putchar_unlocked('0');

                    for (tmp++; tmp < l; tmp++) {
                        putc_unlocked(' ', stdout);
                        putc_unlocked('0', stdout);
                    }
                }

                if (first) {
                    first = 0;
                } else {
                    putchar_unlocked(' ');
                }
                tmp = (l - r + 1) / 2 + (i - l) / 2;
                put_int(tmp);
                putchar_unlocked(' ');
                tmp = (i - r) - tmp;
                put_int(tmp);

                for (tmp = l + 1; tmp < i; tmp++) {
                    putc_unlocked(' ', stdout);
                    putc_unlocked('0', stdout);
                }
                r = i;
            }
        } else {
            // if c is L
            if (!flag) {
                flag = 1;
                l = i;
            }
        }
    }

    if ((tmp = r + 1) < l) {
        if (first) {
            first = 0;
        } else {
            putchar_unlocked(' ');
        }
        putchar_unlocked('0');

        for (tmp++; tmp < l; tmp++) {
            putc_unlocked(' ', stdout);
            putc_unlocked('0', stdout);
        }
    }

    if (first) {
        first = 0;
    } else {
        putchar_unlocked(' ');
    }
    tmp = (l - r + 1) / 2 + (i - l) / 2;
    put_int(tmp);
    putchar_unlocked(' ');
    tmp = (i - r) - tmp;
    put_int(tmp);

    for (tmp = l + 1; tmp < i; tmp++) {
        putc_unlocked(' ', stdout);
        putc_unlocked('0', stdout);
    }

    putchar_unlocked('\n');
}
//  [c]
#include <stdio.h>
#include <string.h>
int main(void){
    char s[100000+5];
    scanf("%s", s);
    
    int ans[100000]={0};
    
    for(int i=0; i<strlen(s);){
        int r=0, l=0;
        while(s[i]=='R')i++, r++;
        int p=i;
        while(s[i]=='L')i++, l++;
        ans[p-1]=(r+1)/2+l/2;
        ans[p]=r/2+(l+1)/2;
    }
    for(int i=0; i<strlen(s); i++)printf("%d ", ans[i]);
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
int main(void){
    char s[100000+5];
    scanf("%s", s);
    
    int ans[100000]={0};
    
    for(int i=0; i<strlen(s); i++){
        int r=0, l=0;
        for( ; s[i]=='R'; i++)r++;
        int p=i;
        for( ; s[i]=='L'; i++)l++;
        ans[p-1]=(r+1)/2+l/2;
        ans[p]=r/2+(l+1)/2;
    }
    for(int i=0; i<strlen(s); i++)printf("%d ", ans[i]);
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(void)
{
    int i,tmp=-1;
    char S[100001];
    int count[100001];
    int L_guusuu=0,L_kisuu=0,R_guusuu=0,R_kisuu=0;

    for(i=0; i<100001; i++) count[i] = 0;

    gets(S);

    int N;
    N = strlen(S);
    printf("%d\n",N);

    for(i=0; i<N-1; i++){
        if(S[i] == 'L'){
            if(i%2 == 0){
                L_guusuu++;
            } else {
                L_kisuu++;
            }
        } else {
            if(i%2 == 0){
                R_guusuu++;
            } else {
                R_kisuu++;
            }
        }
        
        if(S[i] == 'R' && S[i+1] == 'L'){

            if(tmp != -1){
                if(tmp%2 == 0){
                    count[tmp] += L_guusuu;
                    count[tmp+1] += L_kisuu;
                } else {
                    count[tmp] += L_kisuu;
                    count[tmp+1] += L_guusuu;
                }
               
            }
        
            tmp = i;


            if(i%2 == 0){
                count[i] += R_guusuu;
                count[i+1] += R_kisuu;
            } else {
                count[i] += R_kisuu;
                count[i+1] += R_guusuu;
            }
            printf("R_guusuu = %d\n",R_guusuu);
            printf("R_kisuu = %d\n",R_kisuu);
            printf("L_guusuu = %d\n",L_guusuu);
            printf("L_kisuu = %d\n\n",L_kisuu);
            R_guusuu = 0;
            R_kisuu = 0;
            L_guusuu = 0;
            L_kisuu = 0;
            for(int j=0; j<N; j++) printf("%d ",count[j]);
            printf("\n");
        }
    }

     if(tmp%2 == 0){
        count[tmp] += L_guusuu;
        count[tmp+1] += L_kisuu;
    } else {
        count[tmp] += L_kisuu;
        count[tmp+1] += L_guusuu;
    }


    if((N-1)%2 == tmp%2){
        count[tmp]++;
    } else {
        count[tmp+1]++;
    }

       

    //for(i=0; i<N; i++) printf("%c",S[i]);
    for(i=0; i<N; i++) printf("%d ",count[i]);
    printf("\n");

    return 0;
}
//  [javascript]
function main(S) {
    var S = S.trim();
    var squares = Array(S.length).fill(0);
    var rightIndex = 0;
    var leftIndex = 0;
    for (var i = 0; S.length > i; i++) {
        var j = i;
        var count = 0;

        if (S[j] === "R") {
            if (j < rightIndex) {
                j = rightIndex;
                count = j - i;
            }
        } else {
            if (j > leftIndex) {
                j = leftIndex;
                count = i - j;
            }
        }

        while (S[j] + S[j+1] !== "RL") {
            if (S[j] === "R") {
                j++;
            } else {
                j--;
            }

            count++;
        }

        if (j >= i) rightIndex = j;
        if (i >= j) leftIndex = j;

        var point = (count % 2) === 0 ? j : j + 1;
        squares[point] += 1;
    }

    console.log(squares.join(" "));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
    var S = input.trim();
    var move = 1000000;
    var squares = new Array(S.length);
    squares.fill(0);
    var rightIndex = undefined;
    var leftIndex = undefined;
    for (var i = 0; S.length > i; i++) {
        var j = i;
        var count = 0;

        if (S[j] === "R") {
            if (typeof rightIndex !== "undefined" && j < rightIndex) {
                j = rightIndex;
                count = j - i;
            }
        } else {
            if (typeof leftIndex !== "undefined" && j > leftIndex) {
                j = leftIndex;
                count = i - j;
            }
        }

        while (S[j] + S[j+1] !== "RL") {
            if (S[j] === "R") {
                j++;
            } else {
                j--;
            }

            count++;
        }

        if (j >= i) rightIndex = j;
        if (i >= j) leftIndex = j;

        var point = (move - count) % 2 === 0 ? j : j + 1;
        squares[point] += 1;
    }

    console.log(squares.join(" "));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

/////////////////////////////////////
//コピペスペース//////////////////////

//定数
const INF  =  900719925474099 // Math.floor(Number.MAX_SAFE_INTEGER / 10);

//スペース区切りの数字列を数字の配列にして返す
function mapint(line){return line.split(' ').map((v)=>parseInt(v));}

function lower_bound(d,a,b,e){
    for(var c;1<b-a;)
        d[c=0|(a+b)/2]<e ? a=c : b=c;
    return d[a]<e?b:a
};

const N109 = 1000000000;
const MOD = N109+7;

//コピペスペース//////////////////////
/////////////////////////////////////

function Main(input){
	let s = input.trim();
	let n = s.length;

	let p = new Array(n).fill(0);
	let ans = new Array(n).fill(1);
	for(let i=0;i<n-1;i++){
		if(s[i]=='R'&&s[i+1]=='L'){
			p[i] = 1;
			p[i+1] = 1;
			i++;
		}
	}
	let j;
	for(let i=0;i<n-2;i++){
		if(p[i]==1)	continue;

		if(s[i]=='R'){
			ans[i+2] += ans[i];
			ans[i]=0;
		}
	}
	for(let i=n-1;i>1;i--){
		if(p[i]==1) continue;

		if(s[i]=='L'){
			ans[i-2] += ans[i];
			ans[i]=0;
		}
	}
	console.log(ans.join(' '));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var idata = input.split("");
	var ninzuu = [];
	var nextninzuutemp = [];
	//人数の配列を生成
	for( i=0; i<idata.length ; i++ ){
	    ninzuu.push(1);
	    nextninzuutemp.push(0);
	}
	var nextninzuu = nextninzuutemp.slice();
    var kurikaesikaisuu = ninzuu.length+ninzuu.length%2;
    //一回ごとに操作が行われる
	for( turn=0; turn<kurikaesikaisuu ; turn++ ){
		for( j=0; j<ninzuu.length ; j++ ){
			//着目しているマスに右に行けと書いてあった場合
			if(idata[j]=="R"){
				nextninzuu[j+1]=nextninzuu[j+1]+ninzuu[j];
			}else if(idata[j]=="L"){
			    nextninzuu[j-1]=nextninzuu[j-1]+ninzuu[j];
			}
		}
		ninzuu = nextninzuu.slice();
		nextninzuu = nextninzuutemp.slice();
	}
	console.log(ninzuu.join(" "));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var idata = input.split("");
	var ninzuu = [];
	var nextninzuutemp = [];
	//人数の配列を生成
	for( i=0; i<idata.length ; i++ ){
	    ninzuu.push(1);
	    nextninzuutemp.push(0);
	}
	var nextninzuu = nextninzuutemp.slice();
	//一回ごとに操作が行われる
	for( turn=0; turn<ninzuu.length+ninzuu.length%2-1 ; turn++ ){
		for( j=0; j<ninzuu.length ; j++ ){
			//着目しているマスに右に行けと書いてあった場合
			if(idata[j]=="R"){
				nextninzuu[j+1]+=ninzuu[j];
			}else if(idata[j]=="L"){
			    nextninzuu[j-1]+=ninzuu[j];
			}
		}
		ninzuu = nextninzuu.slice();
		nextninzuu = nextninzuutemp.slice();
	}
	console.log(ninzuu.join(" "));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	var idata = input.split("");
	var ninzuu = [];
	var nextninzuutemp = [];
	//人数の配列を生成
	for( i=0; i<idata.length ; i++ ){
	    ninzuu.push(1);
	    nextninzuutemp.push(0);
	}
	var nextninzuu = nextninzuutemp.slice();
	//一回ごとに操作が行われる
	for( turn=0; turn<ninzuu.length+ninzuu.length%2-1 ; turn++ ){
		for( j=0; j<ninzuu.length ; j++ ){
			//着目しているマスに右に行けと書いてあった場合
			if(idata[j]=="R"){
				nextninzuu[j+1]+=ninzuu[j];
			}else if(idata[j]=="L"){
			    nextninzuu[j-1]+=ninzuu[j];
			}
		}
		ninzuu = nextninzuu.slice();
		nextninzuu = nextninzuutemp.slice();
		console.log(ninzuu);
	}
	console.log(ninzuu.join(" "));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"bufio"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	buf := make([]byte, 1e5+1)
	sc.Buffer(buf, 1e5+1)

	sc.Scan()
	S := []byte(sc.Text())

	changes := make([]int, 1)
	changes[0] = 0
	var now byte = 'R'
	for i, el := range S {
		if el != now {
			changes = append(changes, i)
			if now == 'R' {
				now = 'L'
			} else {
				now = 'R'
			}
		}
	}
	changes = append(changes, len(S))

	result := make([]int, len(S))
	for i := 0; i < len(changes)-1; i++ {
		even := i%2 == 0
		num := changes[i+1] - changes[i]
		if even {
			result[changes[i+1]-1] += num%2 + num/2
			result[changes[i+1]] += num / 2
		} else {
			result[changes[i]-1] += num / 2
			result[changes[i]] += num%2 + num/2
		}
	}

	writer := bufio.NewWriter(os.Stdout)
	for i, res := range result {
		if i != 0 {
			writer.WriteString(" ")
		}
		writer.WriteString(strconv.Itoa(res))
	}
	writer.Flush()
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}

func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}

func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0

	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 2
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}

func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	s := getNextString(scanner)
	n := len(s)
	ll := make([]int, n)
	ll[n-1] = n - 1
	rr := make([]int, n)
	for i := 0; i < n-1; i++ {
		rr[i+1] = rr[i]
		if s[i] == 'R' {
			rr[i+1] = i
		}
	}

	for i := n - 2; i >= 0; i-- {
		ll[i] = ll[i+1]
		if s[i+1] == 'L' {
			ll[i] = i + 1
		}
	}

	ans := make([]int, n)
	for i := 0; i < n; i++ {
		if s[i] == 'L' {
			r := rr[i]
			if (i-r)%2 == 1 {
				r++
			}
			ans[r]++
			continue
		}

		l := ll[i]
		if (l-i)%2 == 1 {
			l--
		}
		ans[l]++
	}
	for i := 0; i < n; i++ {
		fmt.Fprintln(writer, ans[i])
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	sc := NewScanner()
	S := sc.Next()

	L := 0
	A := make([]int, len(S))
	for i := L; i < len(S); i++ {
		if S[i] == 'L' {
			step := 0
			if i > 0 && S[i-1] == 'L' {
				A[i] = A[i-1] - 1
			} else {
				for j := i; j >= L; j-- {
					A[j] = step
					step++
				}
			}
			L = i + 1
		}

	}

	ans := make([]int, len(S))
	for i := 0; i < len(S); i++ {
		if A[i]%2 == 0 {
			ans[i+A[i]] += 1
		} else {
			ans[i+A[i]-1] += 1
		}
	}
	PrintI(ans...)
}

func mapToString(arr []int) []string {
	ret := make([]string, len(arr))
	for i := 0; i < len(arr); i++ {
		ret[i] = strconv.Itoa(arr[i])
	}
	return ret
}

func PrintI(args ...int) {
	fmt.Println(strings.Join(mapToString(args), " "))
}

type Scanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewScanner() *Scanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1000)
	return &Scanner{r: rdr}
}
func (s *Scanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *Scanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *Scanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *Scanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *Scanner) NextFloat() float64 {
	v, _ := strconv.ParseFloat(s.Next(), 64)
	return v
}

func (s *Scanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)
			result = append(result, int(v))
			start = s.p + 1
		}
	}

	return result
}
func (s *Scanner) NextInt64Array() []int64 {
	s.pre()
	start := s.p
	result := []int64{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)
			result = append(result, v)
			start = s.p + 1
		}
	}
	return result
}

func (s *Scanner) NextMap() map[int]bool {
	s.pre()
	start := s.p
	mp := map[int]bool{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			mp[v] = true
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	mp[v] = true

	return mp
}

func (s *Scanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *Scanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	//"strconv"
)

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func main() {
	S := readLine()
	ABC136D(S)
	//fmt.Printf("%s\n", ABC136D(S))
}

// ABC136D ...
func ABC136D(S string) (res string) {
	resSlice := make([]int, len(S))

	for i := 0; i < len(S); i++ {
		pos, cnt := i, 0
		for {
			if S[pos] == 'R' && S[pos+1] == 'L' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos+1]++
				}
				break
			} else if S[pos] == 'L' && S[pos-1] == 'R' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos-1]++
				}
				break
			} else if S[pos] == 'R' {
				pos++
				cnt++
			} else if S[pos] == 'L' {
				pos--
				cnt++
			}
		}
	}

	for i := 0; i < len(resSlice)-1; i++ {
		//res += strconv.Itoa(resSlice[i]) + " "
      	fmt.Printf("%d ", resSlice[i])
	}
  	fmt.Printf("%d", resSlice[len(resSlice)-1])

	//return res[0 : len(res)-1]
  	return
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func main() {
	S := readLine()

	fmt.Printf("%s\n", ABC136D(S))
}

// ABC136D ...
func ABC136D(S string) (res string) {
	resSlice := make([]int, len(S))

	for i := 0; i < len(S); i++ {
		pos, cnt := i, 0
		for {
			if S[pos] == 'R' && S[pos+1] == 'L' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos+1]++
				}
				break
			} else if S[pos] == 'L' && S[pos-1] == 'R' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos-1]++
				}
				break
			} else if S[pos] == 'R' {
				pos++
				cnt++
			} else if S[pos] == 'L' {
				pos--
				cnt++
			}
		}
	}

	for i := 0; i < len(resSlice); i++ {
		res += strconv.Itoa(resSlice[i]) + " "
	}

	return res[0 : len(res)-1]
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner((os.Stdin))

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	l := nextLine()
	i, e := strconv.Atoi(l)
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	sc.Split(bufio.ScanWords)
	S := nextLine()

	fmt.Printf("%s\n", ABC136D(S))
}

// ABC136D ...
func ABC136D(S string) (res string) {
	resSlice := make([]int, len(S))

	for i := 0; i < len(S); i++ {
		pos, cnt := i, 0
		for {
			if S[pos] == 'R' && S[pos+1] == 'L' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos+1]++
				}
				break
			} else if S[pos] == 'L' && S[pos-1] == 'R' {
				if cnt%2 == 0 {
					resSlice[pos]++
				} else {
					resSlice[pos-1]++
				}
				break
			} else if S[pos] == 'R' {
				pos++
				cnt++
			} else if S[pos] == 'L' {
				pos--
				cnt++
			}
		}
	}

	for i := 0; i < len(resSlice); i++ {
		res += strconv.Itoa(resSlice[i]) + " "
	}

	return res[0 : len(res)-1]
}
//  [ruby]
S=gets.chomp
l=S.length

a = [0]*l

i = 0
while i != l
  j = S.index(?L,i)
  c = j-i
  a[j] += c/2
  a[j-1] += c/2+(c%2)
  i = S.index(?R,j) || l
  c = i-j
  a[j-1] += c/2
  a[j] += c/2+(c%2)
end

puts a*' '
//  [ruby]
s = gets
f, c = 0, 0
p = []
0.upto(s.size - 1) do |i|
  if s[i] == 'R'
    if f == 1
      f = 0
      p.push(c)
      c = 0
    end
    c += 1
  else
    if f == 0
      f = 1
      p.push(c)
      c = 0
    end
    if i == s.size - 1
      p.push(c)
    end
    c += 1
  end
end
ans = ''
while p.size > 0
  x = p.shift
  y = p.shift
  if (x + y).even?
    (x - 1).times do
      ans.concat('0 ')
    end
    ans.concat(((x + y) / 2).to_s)
    ans.concat(' ')
    ans.concat(((x + y) / 2).to_s)
    ans.concat(' ')
    (y - 1).times do
      ans.concat('0 ')
    end
  elsif (x.even?)
    (x - 1).times do
      ans.concat('0 ')
    end
    ans.concat(((x + y) / 2).to_s)
    ans.concat(' ')
    ans.concat(((x + y) / 2 + 1).to_s)
    ans.concat(' ')
    (y - 1).times do
      ans.concat('0 ')
    end
  else
    (x - 1).times do
      ans.concat('0 ')
    end
    ans.concat(((x + y) / 2 + 1).to_s)
    ans.concat(' ')
    ans.concat(((x + y) / 2).to_s)
    ans.concat(' ')
    (y - 1).times do
      ans.concat('0 ')
    end
  end
end
puts ans
//  [ruby]
S=gets.chomp

arr = [0]*S.length

i = 0
loop do
  idx = S.index('L',i)
  c = idx-i
  arr[idx] += c/2
  arr[idx-1] += c/2+(c%2)
  i = S.index('R',idx) || S.length
  c = i-idx
  arr[idx-1] += c/2
  arr[idx] += c/2+(c%2)
  break if i == S.length
end

puts arr.join(' ')
//  [ruby]
S = gets.chomp.split("")

array = S.map{|_| 1}
before = S.map{|_| 0}

(10**100).times do |i|
  tmp = S.map{|_| 0}
  S.each.with_index do |s, i|
    if s == 'R'
      tmp[i+1] += array[i]
    else
      tmp[i-1] += array[i]
    end
  end
  if before == tmp && i % 2 == 0
    break
  end
  before = array
  array = tmp
end
print "#{array.join(' ')}\n"
//  [ruby]
def mpow(n, p, mod)
  r = 1
  while p > 0
    r = r * n % mod if p & 1 == 1
    n = n * n % mod
    p >>= 1
  end
  r
end

str = gets.chomp

l = str.length
box = Array.new(l, 1)

doit = ->{
  nxt = Array.new(l, 0)
  str.each_char.with_index do |c, i|
    if c == "R"
      nxt[i + 1] += box[i]
    else
      nxt[i - 1] += box[i]
    end
  end
  box = nxt
}

stack = [box.join]
idx = nil

loop do
  doit.()
  tmp = box.join.rjust(l, "0")
  break if (idx = stack.index(tmp))
  stack << tmp
end

ln = stack.size - idx
i = idx + (mpow(10, 100, ln) - idx % ln) % ln

puts stack[i].chars.join(" ")
//  [ruby]
require 'pp'

# 入力値を文字の配列で返却する
def gets_nsp_list()
  gets.chomp.split("")
end

s_list = gets_nsp_list
N = s_list.size
children = Array.new(N,1)
10**6.times do
  tmp_children = Array.new(N,0)
  s_list.each_with_index do |s, i|
    current = children[i]
    if s == "R"
      tmp_children[i+1] += current
    elsif s == "L"
      current = children[i]
      tmp_children[i-1] += current
    end
  end
  children = tmp_children
end
puts children.join(" ")
//  [rust]
use std::io::{stdin, stdout, BufReader, BufRead, StdinLock, Write, BufWriter};

fn main() {
    let (std_in, std_out) = (stdin(), stdout());
    let mut br = BufReader::new(std_in.lock());
    let mut bw = BufWriter::new(std_out.lock());
    
    let s = rs(&mut br);
    let n = s.len();
    let mut res = vec![0; n];

    let mut r = 0;
    for i in 0..n {
        if s[i] == 'R' {
            r += 1;
        } else {
            res[i] += r / 2;
            res [i-1] += (r + 1) / 2;
            r = 0;
        }
    }
    let mut l = 0;
    for i in (0..n).rev() {
        if s[i] == 'L' {
            l += 1;
        } else {
            res[i] += l / 2;
            res [i+1] += (l + 1) / 2;
            l = 0;
        }
    }
    for x in res {
        write!(&mut bw, "{} ", x);
    }
}


//////////////////////////////////////////////////////////////////////////////////
#[allow(dead_code)]
fn rs(br: &mut BufReader<StdinLock>) -> Vec<char> {
    let mut buf = String::new();
    br.read_line(&mut buf).ok();
    buf.trim().chars().collect()
}

#[allow(dead_code)]
fn rn<T: std::str::FromStr>(br: &mut BufReader<StdinLock>) -> T {
    let mut buf = String::new();
    br.read_line(&mut buf).ok();
    buf.trim().parse().ok().unwrap()
}

#[allow(dead_code)]
fn rvs(br: &mut BufReader<StdinLock>) -> Vec<Vec<char>> {
    let mut buf = String::new();
    br.read_line(&mut buf).ok();
    buf.trim().split_whitespace().map(|e| e.chars().collect()).collect()
}

#[allow(dead_code)]
fn rvn<T: std::str::FromStr>(br: &mut BufReader<StdinLock>) -> Vec<T> {
    let mut buf = String::new();
    br.read_line(&mut buf).ok();
    buf.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}
//  [rust]
#[allow(unused_imports)]
use std::cmp;
use std::io::Write;

// Input macro from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
  (source = $s:expr, $($r:tt)*) => {
    let mut iter = $s.split_whitespace();
    input_inner!{iter, $($r)*}
  };
  ($($r:tt)*) => {
    let s = {
      use std::io::Read;
      let mut s = String::new();
      std::io::stdin().read_to_string(&mut s).unwrap();
      s
    };
    let mut iter = s.split_whitespace();
    input_inner!{iter, $($r)*}
  };
}

macro_rules! input_inner {
  ($iter:expr) => {};
  ($iter:expr, ) => {};

  ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
    let $var = read_value!($iter, $t);
    input_inner!{$iter $($r)*}
  };
}

macro_rules! read_value {
  ($iter:expr, ( $($t:tt),* )) => {
    ( $(read_value!($iter, $t)),* )
  };

  ($iter:expr, [ $t:tt ; $len:expr ]) => {
    (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
  };

  ($iter:expr, chars) => {
    read_value!($iter, String).chars().collect::<Vec<char>>()
  };

  ($iter:expr, usize1) => {
    read_value!($iter, usize) - 1
  };

  ($iter:expr, $t:ty) => {
    $iter.next().unwrap().parse::<$t>().expect("Parse error")
  };
}

fn main() {
  let out = std::io::stdout();
  let mut out = std::io::BufWriter::new(out.lock());
  macro_rules! puts {
    ($($format:tt)*) => (write!(out,$($format)*).unwrap());
  }
  input! {
    s: chars,
  }
  let n = s.len();
  let mut stay = vec![false; n];
  for i in 1 .. n {
    if s[i-1] == 'R' && s[i] == 'L' {
      stay[i-1] = true;
      stay[i] = true;
    }
  }
  let mut count = vec![1; n];
  for i in 1 .. n {
    if s[i-1] == 'R' && ! stay[i-1] {
      count[i+1] += count[i-1];
      count[i-1] = 0;
    }
  }
  for i in (1 .. n).rev() {
    if s[i] == 'L' && ! stay[i] {
      count[i-2] += count[i];
      count[i] = 0;
    }
  }
  for &c in &count {
    puts!("{} ", c);
  }
  puts!("\n");
}
//  [rust]
#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use itertools::Itertools;

const U_INF: usize = 1 << 60;
const I_INF: isize = 1 << 60;

fn main() {
    let mut sc = Scanner::new();
    let s = sc.next_chars();
    let l = s.len();
    let log = 1e5f64.log2().floor() as usize;

    let mut doubling = Vec::with_capacity(log);

    {
        let mut v = vec![U_INF; l];
        for j in 0..l {
            if s[j] == 'R' {
                v[j] = j + 1;
            } else {
                v[j] = j - 1;
            }
        }
        doubling.push(v);
    }

    for i in 0..log {
        let mut v = vec![U_INF; l];
        for j in 0..l {
            v[j] = doubling[i][doubling[i][j]];
        }
        doubling.push(v);
    }

    let mut now = (0..l).collect_vec();
    for i in 0..=log {
        if (100000 & 1 << i) != 0 {
            let mut v = vec![U_INF; l];
            for j in 0..l {
                v[j] = doubling[i][j];
            }
            now = v;
        }
    }

    let mut ans = vec![0; l];
    for n in now {
        ans[n] += 1;
    }

    println!("{}", ans.into_iter().join(" "));
}

pub struct Scanner {
    buf: std::collections::VecDeque<String>,
}

impl Scanner {
    pub fn new() -> Self {
        Self {
            buf: std::collections::VecDeque::new(),
        }
    }

    fn scan_line(&mut self) {
        let mut flag = 0;
        while self.buf.is_empty() {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).unwrap();
            let mut iter = s.split_whitespace().peekable();
            if iter.peek().is_none() {
                if flag >= 5 {
                    panic!("There is no input!");
                }
                flag += 1;
                continue;
            }

            for si in iter {
                self.buf.push_back(si.to_string());
            }
        }
    }

    pub fn next<T: std::str::FromStr>(&mut self) -> T {
        self.scan_line();
        self.buf
            .pop_front()
            .unwrap()
            .parse()
            .unwrap_or_else(|_| panic!("Couldn't parse!"))
    }

    pub fn next_usize(&mut self) -> usize {
        self.next()
    }

    pub fn next_isize(&mut self) -> isize {
        self.next()
    }

    pub fn next_chars(&mut self) -> Vec<char> {
        self.next::<String>().chars().collect()
    }

    pub fn next_string(&mut self) -> String {
        self.next()
    }

    pub fn next_char(&mut self) -> char {
        self.next()
    }

    pub fn next_float(&mut self) -> f64 {
        self.next()
    }
}
//  [rust]
#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use itertools::Itertools;

const U_INF: usize = 1 << 60;
const I_INF: isize = 1 << 60;

fn main() {
    let mut sc = Scanner::new();
    let s = sc.next_chars();
    let l = s.len();
    let log = 1e5f64.log2().floor() as usize;

    let mut doubling = Vec::with_capacity(log);

    {
        let mut v = vec![U_INF; l];
        for j in 0..l {
            if s[j] == 'R' {
                v[j] = j + 1;
            } else {
                v[j] = j - 1;
            }
        }
        doubling.push(v);
    }

    for i in 0..log {
        let mut v = vec![U_INF; l];
        for j in 0..l {
            v[j] = doubling[i][doubling[i][j]];
        }
        doubling.push(v);
    }

    let mut now = (0..l).collect_vec();
    for i in 0..log {
        if (100000 & 1 << i) != 0 {
            let mut v = vec![U_INF; l];
            for j in 0..l {
                v[j] = doubling[i][j];
            }
            now = v;
        }
    }

    let mut ans = vec![0; l];
    for n in now {
        ans[n] += 1;
    }

    println!("{}", ans.into_iter().join(" "));
}

pub struct Scanner {
    buf: std::collections::VecDeque<String>,
}

impl Scanner {
    pub fn new() -> Self {
        Self {
            buf: std::collections::VecDeque::new(),
        }
    }

    fn scan_line(&mut self) {
        let mut flag = 0;
        while self.buf.is_empty() {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).unwrap();
            let mut iter = s.split_whitespace().peekable();
            if iter.peek().is_none() {
                if flag >= 5 {
                    panic!("There is no input!");
                }
                flag += 1;
                continue;
            }

            for si in iter {
                self.buf.push_back(si.to_string());
            }
        }
    }

    pub fn next<T: std::str::FromStr>(&mut self) -> T {
        self.scan_line();
        self.buf
            .pop_front()
            .unwrap()
            .parse()
            .unwrap_or_else(|_| panic!("Couldn't parse!"))
    }

    pub fn next_usize(&mut self) -> usize {
        self.next()
    }

    pub fn next_isize(&mut self) -> isize {
        self.next()
    }

    pub fn next_chars(&mut self) -> Vec<char> {
        self.next::<String>().chars().collect()
    }

    pub fn next_string(&mut self) -> String {
        self.next()
    }

    pub fn next_char(&mut self) -> char {
        self.next()
    }

    pub fn next_float(&mut self) -> f64 {
        self.next()
    }
}