#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> P;

#define p_ary(ary,a,b) do { cout << "["; for (int count = (a);count < (b);++count) cout << ary[count] << ((b)-1 == count ? "" : ", "); cout << "]\n"; } while(0)
#define p_map(map,it) do {cout << "{";for (auto (it) = map.begin();;++(it)) {if ((it) == map.end()) {cout << "}\n";break;}else cout << "" << (it)->first << "=>" << (it)->second << ", ";}}while(0)

struct LazySegmentTree {
private:
    int n;
    vector<ll> node,lazy;
    vector<bool> upd;
    ll const INF = 1LL<<60;
public:
    LazySegmentTree(vector<ll> v) {
        int sz = v.size();
        n = 1;
        while (n < sz) n *= 2;
        node.resize(2*n-1);
        lazy.resize(2*n-1,INF);
        upd.resize(2*n-1,false);
        for (int i = 0;i < sz;++i) node[i+n-1] = v[i];
        for (int i = n-2;i >= 0;--i) node[i] = min(node[i*2+1],node[i*2+2]);
    }

    void eval(int k,int l,int r) {
        if (upd[k]) {
            if (node[k] > lazy[k]) node[k] = lazy[k];
            if (r-l > 1) {
                // lazy[2*k+1] = lazy[2*k+2] = lazy[k];
                if (lazy[2*k+1] > lazy[k]) lazy[2*k+1] = lazy[k];
                if (lazy[2*k+2] > lazy[k]) lazy[2*k+2] = lazy[k];
                upd[2*k+1] = upd[2*k+2] = true;
            }
            lazy[k] = INF;
            upd[k] = false;
        }
    }

    void update(int a,int b,ll x,int k = 0,int l = 0,int r = -1) {
        if (r < 0) r = n;
        eval(k,l,r);
        if (b <= l || r <= a) return;
        if (a <= l && r <= b) {
            if (upd[k]) {
                if (lazy[k] > x) lazy[k] = x;
            } else {   
                lazy[k] = x;
                upd[k] = true;
            }
            eval(k,l,r);
        } else {
            update(a,b,x,2*k+1,l,(l+r)/2);
            update(a,b,x,2*k+2,(l+r)/2,r);
            node[k] = min(node[2*k+1],node[2*k+2]);
        }
    }

    ll getmin(int a,int b,int k = 0,int l = 0,int r = -1) {
        if (r < 0) r = n;
        if (b <= l || r <= a) return INF;
        eval(k,l,r);
        if (a <= l && r <= b) return node[k];
        ll vl = getmin(a,b,k*2+1,l,(l+r)/2);
        ll vr = getmin(a,b,2*k+2,(l+r)/2,r);
        return min(vl,vr);
    }

    ll find(int a,int b,ll x,int k = 0,int l = 0,int r = -1) {
        if (r < 0) r = n;
        if (r <= a || b <= l || node[k] >= x) return INF;
        eval(k,l,r);
        if (k >= n-1) return k-n+1;
        ll vl = find(a,b,x,2*k+1,l,(l+r)/2);
        if (vl != INF) return vl;
        return find(a,b,x,2*k+2,(l+r)/2,r);
    }
};

int main() {
    int n,m;
    cin >> n >> m;
    vector<int> r(n+1);
    string s;
    cin >> s;
    {
        int j = n;
        for (int i = n;i >= 0;--i) {
            if (s[i] == '0') r[i] = i,j = i;
            else r[i] = j;
        }
    }
    LazySegmentTree seg(vector<ll>(n+10,INT_MAX));
    seg.update(n,n+1,0);
    for (int i = n;i > 0;--i) if (s[i] == '0') seg.update(i-m,i,seg.getmin(i,i+1)+1);
    // int ans = seg.getmin(0,1);
    // cout << ans << endl;
    // for (int i = 0;i < n+1;++i) cout << seg.getmin(i,i+1) << " ";
    // cout << endl;
    if (seg.getmin(0,1) == INT_MAX) {
        cout << -1 << endl;
        return 0;
    }
    vector<int> ans = {0};
    int l = 0;
    while (l < n) {
        l = r[seg.find(l,n+1,seg.getmin(l,l+1))];
        ans.push_back(l);
    }
    int k = ans.size()-1;
    for (int i = 0;i < k;++i) cout << ans[i+1]-ans[i] << " \n"[i == k-1];
    // p_ary(ans,0,ans.size());
}

Measured memory_bytes: 6000