#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl "\n"
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int)(x)); i > 0; i--)
#define INF (1 << 30 - 1)
#define LLINF (1LL << 60)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ALL(a) (a).begin(), (a).end()
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec)
        is >> x;
    return is;
}

template <typename Monoid>
class SegmentTree {
public:
    using F = function<Monoid(Monoid, Monoid)>;

    vector<int> node;
    int size;
    int n;
    F f;
    Monoid ie;

    SegmentTree(vector<int> in, F f, Monoid ie) : f(f), ie(ie) {
        n = 1;
        while (n < in.size()) {
            n *= 2;
        }
        size = n * 2 - 1;
        node.resize(size, 0);
        for (int i = 0; i < in.size(); i++) {
            node[n - 1 + i] = in[i];
        }
        init_dfs(0);
    }

    int init_dfs(int now) {
        if (2 * now + 1 >= size)
            return node[now];
        node[now] = f(init_dfs(2 * now + 1), init_dfs(2 * now + 2));
        return node[now];
    }

    void add(int index, int val) {
        index += n - 1;
        node[index] += val;
        while (index > 0) {
            index = (index - 1) / 2;
            node[index] = f(node[2 * index + 1], node[2 * index + 2]);
        }
    }

    void update(int index, int val) {
        index += n - 1;
        node[index] = val;
        while (index > 0) {
            index = (index - 1) / 2;
            node[index] = f(node[2 * index + 1], node[2 * index + 2]);
        }
    }

    //半開区間[l,r)に注意
    int query(int a, int b) {
        return _query(a, b, 0, 0, n);
    }

private:
    int _query(int a, int b, int now, int l, int r) {
        if (r <= a || b <= l)
            return ie;
        if (a <= l && r <= b)
            return node[now];
        int val_l = _query(a, b, 2 * now + 1, l, (l + r) / 2);
        int val_r = _query(a, b, 2 * now + 2, (l + r) / 2, r);
        return f(val_l, val_r);
    }
};

signed main() {
    cin >> N >> M >> S;
    vi dp(N + 1, INF);
    dp[N] = 0;
    function<int(int, int)> min = [](int a, int b) { return std::min(a, b); };
    SegmentTree<int> st(dp, min, INF);
    RREP(i, N + 1) {
        if (S[i] == '1') {
            continue;
        }
        int q = st.query(i, min(N + 1, i + M + 1));
        dp[i] = q == INF ? INF : q + 1;
        st.update(i, dp[i]);
    }
    int cnt = dp[0] - 1;
    int prev = 0;
    dump(dp);
    if (dp[0] == INF) {
        cout << -1 << endl;
        return 0;
    }
    REP(i, N + 1) {
        if (cnt == dp[i]) {
            cout << i - prev << endl;
            prev = i;
            cnt--;
        }
    }
}

Measured memory_bytes: 2304