n, m = gets.split.map(&:to_i)
s = gets.chomp

i = n
a = []
while i > 0
    x = ([i-m, 0].max).upto(i) {|j| break j if s[j] == ?0}
    
    if i == x
        a = [-1]
        break
    end

    a.unshift(i-x)
    i = x
end

puts a * " "