def f n, m, a
  pos, arr = 0, []
  a = a.chars.map{|i| i == '0'}.reverse
  while pos < n
    k = (0..m).to_a.reverse.find{|i| a[pos + i]}
    if k == 0
      return -1
    end
    arr << k
    pos += k
  end
  arr.reverse
end
n, m = gets.chomp.split(' ').map{|i| i.to_i}
s = gets.chomp
puts f(n, m, s).join(' ')