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)

  (1 to m).foreach {i =>
    if (s.charAt(i) == '0') memo(i) = Array(i)
  }

  def step(i: Int): Array[Int] = {
    (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
        if (i == n) memo(i) else step(i + 1)
    }
  }

  println((if (m >= n) Array(n) else step(m + 1)).mkString(" "))
}