#include <bits/stdc++.h>

using namespace std;

template<typename S, typename T>
ostream& operator<<(ostream& out, const pair<S, T> p) {
    out << "(" << p.first << "," << p.second << ")";
    return out;
}

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
    for (auto a: v)
        out << a << " ";
    return out;
}

template<typename T>
ostream& operator<<(ostream& out, const set<T>& S) {
    for (auto a: S)
        cout << a << " ";
    return out;
}

template<typename T>
ostream& operator<<(ostream& out, const multiset<T>& S) {
    for (auto a: S)
        cout << a << " ";
    return out;
}

template<typename S, typename T>
ostream& operator<<(ostream& out, const map<S, T>& M) {
    for (auto m: M)
        cout << "(" << m.first << "->" << m.second << ") ";
    return out;
}

template<typename S, typename T>
pair<S, T> operator+(pair<S, T> a, pair<S, T> b) {
    return make_pair(a.first + b.first, a.second + b.second);
}

template<typename S, typename T>
pair<S, T> operator-(pair<S, T> a, pair<S, T> b) {
    return make_pair(a.first - b.first, a.second - b.second);
}

template<typename T>
struct SegmentTree {
    int n;
    vector<T> minv;
    T inf = numeric_limits<T>::max();

    void init(int n) {
        this->n = n;
        minv.assign(2 * n - 1, inf);
    }

    template<typename ParameterType>
    void buildup(vector<ParameterType>& A) {
        n = A.size();
        init(n);
        for (int i = 0; i < n; i++)
            minv[i + n - 1] = A[i];
    }

    void minimize_value(int x, int y, T val) {
        x += n - 1;
        y += n - 1;
        while (x <= y) {
            if (x % 2 == 0) {
                minv[x] = min(minv[x], val);
                x++;
            } else if (y % 2) {
                minv[y] = min(minv[y], val);
                y--;
            } else {
                x = (x - 1) / 2;
                y = (y - 1) / 2;
            }
        }
    }

    void pushdown() {
        for (int i = 0; i < n - 1; i++) {
            minv[2 * i + 1] = min(minv[2 * i + 1], minv[i]);
            minv[2 * i + 2] = min(minv[2 * i + 2], minv[i]);
        }
    }

    T query_value_after_pushdown(int x) {
        x += n -1;
        return minv[x];
    }

    T query_value(int x) {
        x += n - 1;
        T ans = minv[x];
        while (x) {
            x = (x - 1) / 2;
            ans = min(ans, minv[x]);
        }
        return ans;
    }

    vector<T> unwind() {
        vector<T> A(n);
        for (int i = 0; i < n; i++)
            A[i] = query_value(i);
        return A;
    }
};

SegmentTree<int> segment;

vector<int> solve() {
    int n, m;
    vector<int> A;
    string str;
    cin >> n >> m >> str;
    A.assign(n + 1, 1e9);
    A[0] = -1;
    segment.buildup(A);
    for (int i = 0; i < n; i++) {
        if (str[i] == '0' && segment.query_value(i) != 1e9) {
            int j = i + m;
            if (j > n)
                j = n;
            segment.minimize_value(i + 1, j, i);
        }
    }
    // cout << "segment: " << segment.unwind() << endl;
    segment.pushdown();
    /*
    for (int i = 0; i <= n; i++) {
        cout << "segment[" << i << "]: " << segment.query_value_after_pushdown(i) << endl;
    }
    */
    if (str[n] == '0' && segment.query_value_after_pushdown(n) != 1e9) {
        vector<int> ans;
        int s = n;
        while (s) {
            int t = segment.query_value_after_pushdown(s);
            ans.push_back(s - t);
            s = t;
        }
        reverse(ans.begin(), ans.end());
        return ans;
    }
    return vector<int>();
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    vector<int> ans = solve();
    if (ans.empty())
        cout << -1 << endl;
    else
        cout << ans << endl;
    return 0;
}


Measured memory_bytes: 2124