import java.util.*

fun main(args: Array<String>) {
    val (N, M) = readLine()!!.split(" ").map{it.toInt()}
    val S = readLine()!!
    val INF = 1e15.toLong()
    val steps = TreeMap<Int, Int>()
    steps[N] = 0
    val minE = TreeMap<Int, Int>()
    minE[0] = N

    for (i in N - 1 downTo 0) {
        if (S[i] == '1') continue

        val e = steps.floorEntry(i + M)

        e?.let {
            steps[i] = e.value + 1

            minE[e.value + 1] = i
        }
    }

    if (steps.contains(0)) {
        val a = ArrayList<Int>()
        for (i in 0 .. steps[0]!!) {
            a.add(minE[i]!!)
        }
        a.reverse()

        val b = ArrayList<Int>()
        for (i in 0 until a.size - 1) {
            b.add(a[i + 1] - a[i])
        }
        println(b.joinToString(" "))
    } else {
        println(-1)
    }
}
