// https://atcoder.jp/contests/abc146/tasks/abc146_f
//
#![allow(unused_imports)]
use std::io::*;
use std::fmt::*;
use std::str::*;
use std::cmp::*;
use std::collections::*;

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };

    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, [ next / $t:tt ]) => {
        {
            let len = read_value!($iter, usize);
            (0..len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
        }
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! dvec {
    ($t:expr ; $len:expr) => {
        vec![$t; $len]
    };

    ($t:expr ; $len:expr, $($rest:expr),*) => {
        vec![dvec!($t; $($rest),*); $len]
    };
}

#[allow(unused_macros)]
macro_rules! ifv {
    ($t:expr, $a:expr, $b: expr) => {
        if $t { $a } else { $b }
    }
}

#[allow(unused_macros)]
macro_rules! fill {
    ($t:expr, $v:expr) => {
        for i in 0..$t.len() {
            $t[i] = $v;
        }
    };
}

#[allow(unused_macros)]
macro_rules! join {
    ($t:expr, $glue:expr) => {
        $t.into_iter().map(|w| w.to_string()).collect::<Vec<_>>().join($glue)
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

// ===

// ====

use std::rc::Rc;
type Merger<T> = Rc<Fn(T, T) -> T>;

struct SegmentTree<T> {
    n: usize,
    default: T,
    lazy_default: T,
    bottom_offset: usize,
    data: Vec<T>,
    lazy: Vec<T>,
    merger: Merger<T>,
    lazy_merger: Merger<T>,
}

impl<T: Copy + Eq> SegmentTree<T> {
    fn new(n: usize, initial: T, merger: Merger<T>, lazy_initial: T, lazy_merger: Merger<T>) -> Self {
        let z = (8u32 * std::mem::size_of::<usize>() as u32) - n.leading_zeros();
        let size = (1<<z) as usize;
        SegmentTree {
            n: size*2,
            default: initial,
            lazy_default: lazy_initial,
            bottom_offset: size,
            data: vec![initial; size*2],
            lazy: vec![lazy_initial; size*2],
            merger: merger,
            lazy_merger: lazy_merger
        }
    }

    /// Compute value [i, j).
    fn compute_range(&mut self, i: usize, j: usize) -> T {
        let m = self.bottom_offset;
        self.inner_compute_range(i, j, 1, 0, m)
    }

    fn inner_compute_range(&mut self, i: usize, j: usize, idx: usize, begin: usize, end: usize) -> T {
        self.propagate(idx);

        if end <= i || j <= begin {
            return self.default;
        } else if i <= begin && end <= j {
            return self.data[idx];
        }
        let center = (begin+end)/2;
        let l = self.inner_compute_range(i, j, idx*2, begin, center);
        let r = self.inner_compute_range(i, j, idx*2+1, center, end);
        (self.merger)(l, r)
    }

    /// Apply given value to [i, j).
    fn apply_range(&mut self, i: usize, j: usize, value: T) {
        let m = self.bottom_offset;
        self.inner_apply_range(i, j, value, 1, 0, m);
    }

    fn inner_apply_range(&mut self, i: usize, j: usize, value: T, idx: usize, begin: usize, end: usize) {
        self.propagate(idx);

        if end <= i || j <= begin {
            return;
        } else if i <= begin && end <= j {
            self.lazy[idx] = (self.lazy_merger)(self.lazy[idx], value);
            self.propagate(idx);
            return;
        }
        let center = (begin+end)/2;
        self.inner_apply_range(i, j, value, idx*2, begin, center);
        self.inner_apply_range(i, j, value, idx*2+1, center, end);
        self.data[idx] = (self.merger)(self.data[idx*2], self.data[idx*2+1]);
    }

    fn merge(&mut self, i: usize, j: usize) -> T {
        (self.merger)(self.data[i], self.data[j])
    }

    fn propagate(&mut self, idx: usize) {
        if self.lazy[idx] == self.lazy_default {
            return;
        }
        self.data[idx] = (self.lazy_merger)(self.data[idx], self.lazy[idx]);
        if idx*2+1 < self.lazy.len() {
            self.lazy[idx*2] = (self.lazy_merger)(self.lazy[idx*2], self.lazy[idx]);
            self.lazy[idx*2+1] = (self.lazy_merger)(self.lazy[idx*2+1], self.lazy[idx]);
        }
        self.lazy[idx] = self.lazy_default;
    }
}

// ====

// ===

const INF: i32 = 100000000;

fn main() {
    input! {
        n: usize, m: usize,
        s: chars
    };


    let mut seg = SegmentTree::new(n+m+16, INF, Rc::new(|a,b| min(a,b)), 0i32, Rc::new(|a,b| a+b));
    seg.apply_range(n, n+1, -INF);
    for i in (0..n).rev() {
        if s[i] == '1' {
            continue;
        }
        let w = seg.compute_range(i, i+1);
        let best = seg.compute_range(i+1, i+m+1)+1;
        if w > best {
            seg.apply_range(i, i+1, best-w);
        }
    }

    let mut te = seg.compute_range(0, 1);
    if te >= INF {
        println!("-1");
        return;
    }

    let mut w = vec![];
    let mut now = 0;
    while te >= 1 {
        let mut ng = now;
        let mut ok = now + m + 1;
        while ok - ng > 1 {
            let med = (ok + ng) / 2;
            if seg.compute_range(now+1, med) == te-1 {
                ok = med;
            } else {
                ng = med;
            }
        }
        w.push(ok-1-now);
        now = ok-1;
        te -= 1;
    }
    println!("{}", join!(w, " "));
}


Measured memory_bytes: 14716