import java.util.Scanner

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    val N = sc.nextInt()
    val M = sc.nextInt()
    val S = sc.next()

    val A = IntArray(N+1) { -1 }
    A[N] = 0
    var sel = N
    var nxt = N
    for (i in N-1 downTo 0) {
	if (sel - i > M) {
	    if (sel == nxt) {
		println("-1")
		return
	    }
	    sel = nxt
	}
	if (S[i] == '0') {
	    A[i] = sel - i
	    nxt = i
	}
    }

    val ans = mutableListOf<Int>()
    var i = 0
    while (i < N) {
	ans.add(A[i])
	i += A[i]
    }
    println(ans.joinToString(" "))
}
