n,m = gets.chomp.split.map(&:to_i)
s = gets.chomp.split(//).map(&:to_i)

ans = []
cur = n
while cur >= m
  possible = false
  m.downto(1).each do |j|
    # p [cur, j, s[cur-j]]
    if s[cur-j] == 0
      ans.unshift j
      cur -= j
      possible = true
      break
    end
  end

  unless possible
    puts -1
    exit
  end
  # p ans
end

ans.unshift cur if cur > 0
puts ans.join(' ')