n,m=gets.split.map &:to_i
s=gets
mint=Array(n+1)
mint[0] = n
cur=1
ok=true
n.times {|i|
  idx = n-i-1
  if s[idx] == '0' then
    if mint[cur-1] - idx > m then
      cur += 1
      if mint[cur-1] == nil || mint[cur-1] - idx > m then
        ok = false
        break
      end
    end
    mint[cur] = idx
  end
}
if ok then
ans=[]
cur.times {|i|
  idx=cur-i
  ans << (mint[idx-1]-mint[idx])
}
puts ans.join(' ')
else
  puts -1
end
