N,M=gets.split.map(&:to_i)
S=gets.chomp.reverse
cnt=0
a=Array.new
while true
  ex=false
  M.downto(1) do |i|
    if N<=cnt+i
      a.push(N-cnt)
      cnt=N
      ex=true
      break
    elsif S[cnt+i]=="0"
      a.push(i)
      cnt+=i
      break
    end
    if i==1
      puts -1
      exit
    end
  end
  break if ex
end
puts a.reverse.join(" ")
     
    