def min(a,b); a < b ? a : b; end
  
N, M = gets.split.map(&:to_i)
S = gets.chomp
smax = Array.new(N + 1, N)
(0 .. N).inject(0) do |m,i|
  if i > m + M
    puts -1
    exit
  end
  smax[i] = S[i] == '0' ? i : m
end

dp = Array.new(N + 1, 0)
(0 ... N).reverse_each do |i|
  dp[i] = dp[smax[min(N, i + M)]] + 1
end

A = Array.new(dp[0], 0)
dp[0].times.inject(0) do |pos, c|
  A[c] = (1 .. M).find do |j|
    S[pos + j] == '0' && dp[pos + j] + (c + 1) <= dp[0]
  end
  pos + A[c]
end
puts A * ' '
