#include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...)name
#define _rep(i,n)repi(i,0,n)
#define repi(i,a,b)for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define MSVC_UNKO(x)x
#define rep(...)MSVC_UNKO(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c)c.begin(),c.end()
#define write(x)cout<<(x)<<'\n'
using namespace std; typedef long long ll; template<class T>using vv = vector<vector<T>>;
template<class T>auto vvec(int n, int m, T v) { return vv<T>(n, vector<T>(m, v)); }
template<class T, class U>bool chmax(T& a, U&& b) { return a < b ? a = b, 1 : 0; }
template<class T, class U>bool chmin(T& a, U&& b) { return b < a ? a = b, 1 : 0; }
constexpr int INF = 1 << 29, MOD = int(1e9) + 7; constexpr ll LINF = 1LL << 60;
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }aaaa;

template<typename T, class F, const T& I>
struct SegmentTree {
    const F op;
    int n; vector<T> dat;
    SegmentTree() : op() {}
    SegmentTree(F f) : op(f) {}
    T operator [](int i) const { return dat[n + i]; }
    void build(const vector<T>& v) {
        int n_ = v.size(); init(n_); for (int i = 0; i < n_; ++i) dat[n + i] = v[i];
        for (int i = n - 1; i; --i) dat[i] = op(dat[i * 2], dat[i * 2 + 1]);
    }
    void init(int n_) { n = 1; while (n < n_) n *= 2; dat.assign(n * 2, I); }
    template<class T_ = T, class SA = enable_if_t<is_same<remove_reference_t<T_>, T>::value>>
    void update(int k, T_&& v) { dat[k += n] = v; while (k /= 2) dat[k] = op(dat[k * 2], dat[k * 2 + 1]); }
    T query(int a, int b) {
        T vl = I, vr = I;
        for (int l = a + n, r = b + n; l < r; l /= 2, r /= 2) { if (l & 1) vl = op(vl, dat[l++]); if (r & 1) vr = op(dat[--r], vr); }
        return op(vl, vr);
    }
    template<class C> int find(int a, int b, C&& check) const { return find(a, b, check, 1, 0, n); }
private:
    template<class C> int find(int a, int b, C&& check, int k, int l, int r) const {
        if (!check(dat[k]) || r <= a || b <= l) return -1; else if (k >= n) return k - n;
        int m = (l + r) / 2; int vl = find(a, b, check, k * 2, l, m);
        if (~vl) return vl; else return find(a, b, check, k * 2 + 1, m, r);
    }
};

using P = pair<pair<int, int>, int>;
struct F {
    constexpr P operator ()(P lhs, P rhs) const { 
        return lhs < rhs ? lhs : rhs;
    }
};
extern constexpr P identity = P(pair<int, int>(INF, INF), -1);

using ST = SegmentTree<P, F, identity>;

int main() {
    int N, M;
    string S;
    cin >> N >> M >> S;

    ST dp;
    dp.build(vector<P>(N + 1, identity));
    dp.update(0, P(pair<int, int>(0, -1), 0));
    rep(i, 1, N + 1) {
        if (S[i] == '1') continue;
        P p = dp.query(max(0, i - M), i);
        if (p == identity) continue;
        dp.update(i, P(pair<int, int>(p.first.first + 1, p.second), i));
    }

    P cur = dp[N];
    if (cur != identity) {
        vector<int> ans;
        while (cur.second != 0) {
            P prev = dp[cur.first.second];
            ans.push_back(cur.second - prev.second);
            cur = prev;
        }
        reverse(all(ans));

        for (int i = 0; i < (int)ans.size(); ++i) {
            cout << ans[i] << (i == (int)ans.size() - 1 ? '\n' : ' ');
        }
    }
    else {
        write(-1);
    }
}

Measured memory_bytes: 4688