S = gets.chomp.split("")

# puts S*" "

children = Array.new(S.length)

for i in 0...(S.length - 1) do
  if S[i] == "R" && S[i+1] == "R" then
    children[i] = 0
  elsif S[i] == "L" && S[i+1] == "L" then
    children[i+1] = 0
  end
end

pointR = 0
for i in 0...S.length do
  pointR += 1 if S[i] == "R"
  if children[i] == nil && S[i] == "R" then
    children[i] = pointR
    next
  elsif S[i] == "L" then
    pointR = 0
  end
end

pointL = 0
for i in (S.length-1).downto(0) do
  pointL += 1 if S[i] == "L"
  if children[i] == nil && S[i] == "L" then
    children[i] = pointL
    next
  elsif S[i] == "R"
    pointL = 0
  end
end

# puts children*" "

for i in 0...(S.length-1) do
  if ([S[i], S[i+1]] == ["R", "L"]) then
    if (children[i].even? && children[i+1].even? && children[i] < children[i+1]) \
      || (children[i].odd? && children[i+1].odd? && children[i] < children[i+1]) then
      children[i] = (children[i] + children[i+1]) / 2
      children[i+1] = children[i]
    elsif ((children[i].even? && children[i+1].even? && children[i] < children[i+1]) \
      || (children[i].odd? && children[i+1].odd? && children[i] < children[i+1])) \
      || ((children[i].even? && children[i] > children[i+1]) \
      || (children[i].odd? && children[i] < children[i+1])) then
      children[i], children[i+1] = children[i+1], children[i]
    end
  end
end

puts children*" "
