import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

class segTree<Monoid>(private val n: Int, private val op: (Monoid, Monoid) -> Monoid, private val e: Monoid){
    private var d: MutableList<Monoid>
    private var size = 1
    private var log = 0

    init {
        while (size < n) {
            size *= 2
            log++
        }
        d = MutableList(2 * size) { e }
    }

    constructor(n: Int, op: (Monoid, Monoid) -> Monoid, e: Monoid, a: Array<Monoid>) : this(n, op, e) {
        for (i in 0 until n) {
            d[size + i] = a[i]
        }
        for (i in size - 1 downTo 1) {
            update(i)
        }
    }

    operator fun set(p: Int, x: Monoid) {
        if (p !in 0 until n) {
            throw Exception()
        }
        val p = p + size
        d[p] = x
        for (i in 1..log) {
            update(p shr i)
        }
    }

    operator fun get(p: Int): Monoid {
        if (p !in 0 until n) {
            throw Exception()
        }
        return d[p + size]
    }

    fun prod(l: Int, r: Int): Monoid {
        if (l !in 0..r || r !in l..n) {
            throw Exception()
        }
        var sml = e
        var smr = e
        var l = l + size
        var r = r + size
        while (l < r) {
            if (l and 1 != 0) sml = op(sml, d[l++])
            if (r and 1 != 0) smr = op(d[--r], smr)
            l /= 2
            r /= 2
        }
        return op(sml, smr)
    }

    fun allProd(): Monoid {
        return d[1]
    }

    fun maxRight(l: Int, f: (Monoid) -> Boolean): Int {
        if (l !in 0..n || !f(e)) {
            throw Exception()
        }
        if (l == n) return n
        var l = l + size
        var sm = e
        do {
            while (l % 2 == 0) l /= 2
            if (!f(op(sm, d[l]))) {
                while (l < size) {
                    l = 2 * l
                    if (f(op(sm, d[l]))) {
                        sm = op(sm, d[l])
                        l++
                    }
                }
                return l - size
            }
            sm = op(sm, d[l])
            l++
        } while ((l and -l) != l)
        return n
    }

    fun minLeft(r: Int, f: (Monoid) -> Boolean): Int {
        if (r !in 0..n || !f(e)) {
            throw Exception()
        }
        if (r == 0) return 0
        var r = r + size
        var sm = e
        do {
            r--
            while (r > 1 && r % 2 != 0) r /= 2
            if (!f(op(d[r], sm))) {
                while (r < size) {
                    r = 2 * r + 1
                    if (f(op(d[r], sm))) {
                        sm = op(d[r], sm)
                        r--
                    }
                }
                return r + 1 - size
            }
            sm = op(d[r], sm)
        } while ((r and -r) != r)
        return 0
    }

    private fun update(k: Int) {
        d[k] = op(d[2 * k], d[2 * k + 1])
    }
}

fun PrintWriter.solve(sc: FastScanner) {
    val n = sc.nextInt()
    val m = sc.nextInt()
    val s = sc.nextLine()
    val INF = 1000000000
    val seg = segTree(n + 1, { x, y -> minOf(x, y) }, INF)
    seg[n] = 0
    for (i in n - 1 downTo 0) {
        if (s[i] == '1') {
            seg[i] = INF
        } else {
            seg[i] = seg.prod(i + 1, minOf(i + m + 1, n + 1)) + 1
        }
    }
    if (seg[0] >= INF) {
        println(-1)
    } else {
        val ans = mutableListOf<Int>()
        var prev = 0
        for (i in 1..n) {
            if (seg[i] != INF && seg[prev] != seg[i]) {
                ans.add(i - prev)
                prev = i
            }
        }
        println(ans.joinToString(" "))
    }
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}

Measured memory_bytes: 60156