array = gets.chomp.split("")
ll= array.length
array2 = [0]
answerArray = []
ll.times {
    answerArray.push(0)
}


i = 0
(ll-1).times {
    
    if array[i] != array[i+1]
        array2.push(i+1)
    end
    i+=1
}

array2.push(ll)


j = 1
ll2 = array2.length

(ll2/2).times {
    left = array2[j] - array2[j-1]
    right = array2[j+1] - array2[j]
    sum = left + right
    
    if sum%2 == 0
        answerArray[array2[j]-1] = sum/2
        answerArray[array2[j]] = sum/2
    elsif left%2 == 0
        answerArray[array2[j]-1] = sum/2
        answerArray[array2[j]] = sum/2 + 1
    else  
        answerArray[array2[j]-1] = sum/2 + 1
        answerArray[array2[j]] = sum/2
    end
    j+=2
}

puts answerArray.join(" ")