N, M = gets.split.map(&:to_i)
S = gets.chomp
ANS = []

N.times.inject(N) do |pos,c|
  break if pos == 0
  k_ = (1 .. M).reverse_each.find do |k|
    pos - k >= 0 && S[pos - k] == '0'
  end
  if k_.nil?
    puts -1
    exit
  end
  ANS << k_
  pos - k_
end
puts ANS.reverse * ' '

