# frozen_string_literal: true

n, k = gets.split.map(&:to_i)
s = gets
a = Array.new
fin = 0
i = 0
while i != n
    f = 0
    cnt = 0
    1..k.each do |j|
        if s[i + j] == '1'
            f = j
            cnt += 1
        end
    end
        if i + f == n
            a << n - i
            break
        end
        if cnt == k
            fin = 1
        elsif k == f && cnt != k
            i += f - 1
            a << f - 1
        elsif k != f && cnt != k
            i += k
            a << k
        else
            aopa = 0
        end
end
if fin == 1
    puts '-1'
else  
    a.each do |b|
        print(b,' ')
    end
end
puts ''