import scala.io.StdIn._
object Main extends App {
  val Array(n, m) = readLine.split(" ").map(_.toInt)
  val s = readLine
  val memo = new Array[Array[Int]](n + 1)

  def step(i: Int): Array[Int] = {
    if (i > n) memo(n)
    else if (s.charAt(i) == '1') step(i + 1)
    else {
      (m to 1 by -1).find{p => s.charAt(i - p) == '0'} match {
        case None => Array(-1)
        case Some(from) =>
          memo(i) = memo(i - from) :+ from
          step(i + 1)
      }
    }
  }

  println(
    if (m >= n) n
    else {
      (1 to m).foreach {i =>
        if (s.charAt(i) == '0') memo(i) = Array(i)
      }
      step(m + 1).mkString(" ")
    }
  )
}