s = gets.chomp!

m = Array.new(3).map{Array.new(s.length, 0)}

m[0].fill(1)

cnt = 0
while true
    a = cnt % 2
    b = 1 - a
    m[2] = m[b].dup
    m[b].fill(0)

    for i in 0...s.length
        if s[i] == "R"
            m[b][i + 1] += m[a][i]
        else
            m[b][i - 1] += m[a][i]
        end
    end

    cnt += 1
    if m[b] == m[2]
        if cnt % 2 == 0
            puts m[b].join(" ")
        else
            puts m[a].join(" ")
        end
        break
    end
end