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

ps = [[0, []]]
ans = []
until ps.empty?
  qs = []
  ps.each do |i, p|
    ans << p if i == N
    qs += (i + 1 .. i + M).select{|j| S[j] == '0' && j <= N}.map{|j| [j, p + [j - i]]}
  end
  break unless ans.empty?
  ps = qs
end
puts ans.empty? ? -1 : ans.sort.first.join(' ')