using System;
using System.Collections.Generic;
using System.Linq;
using BitArray = System.Collections.BitArray;
using BigInteger = System.Numerics.BigInteger;

namespace AtCoderProject
{
    public class Program
    {
        public object Calc()
        {
            s = consoleReader.String.Select(c => c == 'R').ToArray();
            to = new To[s.Length];

            var res = new int[s.Length];

            for (int i = 0; i < s.Length; i++)
            {
                ++res[Calc(i).even];
            }
            return string.Join(" ", res);
        }

        To Calc(int index)
        {
            if (to[index].even != to[index].odd) return to[index];

            if (s[index])
            {
                if (!s[index + 1])
                {
                    to[index] = new To { odd = index + 1, even = index };
                    to[index + 1] = new To { even = index + 1, odd = index };
                }
                else
                {
                    var next = Calc(index + 1);
                    to[index] = new To { odd = next.even, even = next.odd };
                }
            }
            else
            {
                if (s[index - 1])
                {
                    to[index] = new To { odd = index - 1, even = index };
                    to[index - 1] = new To { even = index - 1, odd = index };
                }
                else
                {
                    var next = Calc(index - 1);
                    to[index] = new To { odd = next.even, even = next.odd };
                }
            }
            return to[index];
        }
        bool[] s;
        To[] to;

        struct To
        {
            public int odd;
            public int even;
        }

        #region いつもの
        private readonly ConsoleReader consoleReader;
        public Program(ConsoleReader consoleReader) { this.consoleReader = consoleReader; }
        static void Main() => Console.WriteLine(new Program(new ConsoleReader()).Calc()); static string AllLines<T>(IEnumerable<T> source) => string.Join("\n", source);
        #endregion
    }

#pragma warning disable
    public class ConsoleReader { public class SplitLine { string[] splited; public SplitLine(string line) { splited = line.Split(); } public string[] String => splited.ToArray(); public int[] Int => splited.Select(int.Parse).ToArray(); public long[] Long => splited.Select(long.Parse).ToArray(); public ulong[] ULong => splited.Select(ulong.Parse).ToArray(); public double[] Double => splited.Select(double.Parse).ToArray(); } public class RepeatLine { ConsoleReader reader; int num; public RepeatLine(ConsoleReader reader, int num) { this.reader = reader; this.num = num; } public IEnumerable<string> String { get { for (int i = 0; i < num; i++) yield return reader.String; } } public IEnumerable<int> Int { get { for (int i = 0; i < num; i++) yield return reader.Int; } } public IEnumerable<long> Long { get { for (int i = 0; i < num; i++) yield return reader.Long; } } public IEnumerable<string[]> SplitString { get { for (int i = 0; i < num; i++) yield return reader.Split.String; } } public IEnumerable<int[]> SplitInt { get { for (int i = 0; i < num; i++) yield return reader.Split.Int; } } } public virtual string String => Console.ReadLine(); public int Int => int.Parse(String); public long Long => long.Parse(String); public ulong ULong => ulong.Parse(String); public double Double => double.Parse(String); public SplitLine Split => new SplitLine(String); public RepeatLine Repeat(int count) => new RepeatLine(this, count); }
}

Measured memory_bytes: 28512