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

s.reverse!

pos = 0
plst = [0]
for i in 1..n
    if s[i] == '0'
        pos = i
    end
    if i - plst[-1] >= m or i == n
        if plst[-1] == pos
            puts -1
            exit
        end
        plst << pos 
    end
end

ans = []
(plst.size-1).times do |i|
    ans << plst[i+1] - plst[i]
end

puts ans.reverse.join(" ")
