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

D = []
s = s[0, s.length - 1]
while(s.length > 0) do
  tmp = D.size
  M.downto(1){|i|
    if i <= s.length && s[-i] == "0" then
      D.push(i)
      s = s[0, s.length - i]
      break
    end
  }
  break if tmp == D.size
end

if s.length == 0 then
  (D.size - 1).downto(0){|i| printf("#{D[i]} ")}
  printf("\n")
else
  puts -1
end
