import java.io._
import java.util.StringTokenizer
import scala.util.control.Breaks.{breakable,break}
import scala.collection.mutable.{Map, Stack, Queue, PriorityQueue, Set}

object Main extends App {
  val in = new InputReader(System.in)
  val pw = new PrintWriter(System.out)

  val N, M = in.next().toInt
  val S = in.next().reverse

  //
  val imos = new Array[Int](N+1)
  for (i <- 0 to N) {
    if (S(i) == '0')
      imos(i) = 1
  }

  for (i <- 1 to N)
    imos(i) += imos(i-1)

  // 条件を満たす最小の値を返す
  def binarySearch(_min: Int, _max: Int, base: Int): Int = {
    def check(i: Int): Boolean = {
      imos(i) == base
    }

    def func(min: Int, max: Int): Int = {
      val mid: Int = (max + min) / 2
        (max - min) match{
        case 0 | 1 =>
          check(min) match{
            case true  => min
            case false => max
          }
        case _ =>
          (check(mid)) match{
            case true  => func(min, mid)
            case false => func(mid, max)
          }
      }
    }

    func(_min, _max)
  }

  var ans = List[Int]()

  var now = 0
  var flag = false
  breakable {
    while (now + M < N) {
      if (imos(now) == imos(now+M)) {
        flag = true
        break
      }
      else {
        val next = binarySearch(now+1, now+M, imos(now+M))
        ans = (next - now) :: ans
        now = next
      }
    }
  }

  ans = (N-now) :: ans

  if (flag)
    println(-1)
  else
    println(ans.mkString(" "))
}

object Sub {
  def print2DimArray[A](mat: Array[Array[A]]): Unit = {
    mat.foreach(lin => println(lin.toList))
  }
}

class InputReader(stream: InputStream) {
  private[this] val reader = new BufferedReader(new InputStreamReader(stream))
  private[this] var tokenizer: StringTokenizer = new StringTokenizer(reader.readLine())
  def next(): String = {
    while (!tokenizer.hasMoreTokens()) {
      tokenizer = new StringTokenizer(reader.readLine())
    }
    tokenizer.nextToken()
  }
}
