fun main(args: Array<String>) {
    val (N, M) = readInputLine().split(" ").map { it.toInt() }
    val S = readInputLine().toCharArray().reversed()
    
    var now = 0
    val step = mutableListOf<Int>()
    
    while (now != N) {
        var ok = false
        for (i in M downTo 1) {
            if (now + i > N || S[now + i] == '1') {
                continue
            }
            ok = true
            now = now + i
            step.add(i)
            break
        }
        if (!ok) {
            println(-1)
            return
        }
    }

    println(step.reversed().joinToString(" "))
}

fun readInputLine(): String {
    return readLine()!!
}
