fun main(arg: Array<String>) {
    val S = readLine()!!
    val B = S.mapIndexed { n, c -> S[n + (if (c == 'L') -1 else 1)] == c }
    val A = IntArray(S.length) { 1 }
    for (n in 0 until S.length) {
        if (S[n] == 'R' && B[n]) {
            A[n + 2] += A[n]
            A[n] = 0
        }
    }
    for (n in (0 until S.length).reversed()) {
        if (S[n] == 'L' && B[n]) {
            A[n - 2] += A[n]
            A[n] = 0
        }
    }
    println(A.joinToString(separator = " "))
}
