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

ans = []

current = N

while current > 0
  updated = false

  M.downto(1) do |m|
    n = current - m

    next if n < 0
    next if S[n] == '1'

    ans << m
    current = n
    updated = true
    break
  end

  break unless updated
end

if current == 0
  puts ans.reverse.join(' ')
else
  puts -1
end
