n, m = gets.to_s.split.map{|t|t.to_i}
s = gets.to_s.chomp.bytes

l = []
i = n

begin

  while i >= m
    t = m - s[i-m,m].index(48) # p "0".ord #=> 48
    l << t
    i -= t
  end
  
  l << i if i != 0
  puts l.reverse

rescue

  puts "-1"
  
end