import java.io.*
import java.util.*

fun solve(N: Int, M: Int, S: String) {
    // startからゴールまで辿り着く最短ステップ数
    // dp[i] = min(dp[i+1..i+M]) + 1
    val sqrt = Math.sqrt(N.toDouble()).toInt() + 1
    val dp = Array(sqrt * sqrt) { MinMonoid.empty() }
    dp[N] = 0
    val minQuery = SqrtDecomposition(dp, MinMonoid)
    for (i in N - 1 downTo 0) {
        if (S[i] == '1') continue
        val mstep = minQuery.query(i + 1, Math.min(i + M + 1, N + 1))
        if (mstep == MinMonoid.empty()) { println(-1); return }
        minQuery.update(i, mstep + 1)
    }

    val ans = mutableListOf<Int>()
    var lastIndex = 0
    var step = minQuery.get(0)
    for (i in 1..N) {
        if (minQuery.get(i) == step - 1) {
            ans.add(i - lastIndex)
            lastIndex = i
            step--
        }
    }
    println(ans.joinToString(separator = " "))
    // println(minQuery.array.toList())
    return
}

fun main(args: Array<String>) {
    fun StringArray(size: Int, init: (Int) -> String = { "\u0000" }): Array<String> {
        return Array<String>(size, init)
    }
    class Scanner(stream: InputStream) {
        private val reader = BufferedInputStream(stream).bufferedReader()
        private var st: StringTokenizer? = null
        fun next(): String {
            while (!(st?.hasMoreTokens() ?: false)) st = StringTokenizer(reader.readLine())
            return st!!.nextToken()
        }
    }
    val sc = Scanner(System.`in`)
    val N = sc.next().toInt()
    val M = sc.next().toInt()
    val S = sc.next()
    solve(N, M, S)
}

interface Monoid<T> {
    fun combine(a: T, b: T): T
    fun empty(): T
}

object MinMonoid : Monoid<Int> {
    override fun combine(a: Int, b: Int): Int = Math.min(a, b)
    override fun empty(): Int = Int.MAX_VALUE
}

class SqrtDecomposition<T>(private val array: Array<T>, private val monoid: Monoid<T>) {
    private val divSize = Math.sqrt(array.size.toDouble()).toInt()
    private val bucket = (0 until divSize)
            .map {
                array.slice(it * divSize until (it + 1) * divSize)
                        .reduce { a, b -> monoid.combine(a, b) }
            }
            .toMutableList()

    init {
        require(divSize * divSize == array.size) {
            "array size must be square number. size: ${array.size}"
        }
    }

    fun get(index: Int) = array[index]
    fun query(left: Int, right: Int): T {
        // [left, right)
        require(left in (0 until right) && right <= array.size) {
            "Invalid Range [$left, $right)"
        }
        val bl = left / divSize
        val br = right / divSize
        var res = monoid.empty()
        if (bl == br) {
            (left until right).forEach { res = monoid.combine(res, array[it]) }
        } else {
            (left until (bl + 1) * divSize).forEach { res = monoid.combine(res, array[it]) }
            (bl + 1 until br).forEach { res = monoid.combine(res, bucket[it]) }
            (br * divSize until right).forEach { res = monoid.combine(res, array[it]) }
        }
        return res
    }

    fun update(index: Int, value: T) {
        array[index] = value
        val bi = index / divSize
        bucket[bi] = array.slice(bi * divSize until (bi + 1) * divSize)
                .reduce { a, b -> monoid.combine(a, b) }
    }
}


Measured memory_bytes: 120780