#define _USE_MATH_DEFINES
 
#pragma GCC optimize("Ofast,no-stack-protector") 
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") 
#pragma GCC optimize("unroll-loops") 
#pragma GCC optimize("fast-math")
  
#include <bits/stdc++.h> 
  
using namespace std;
  
#define $(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define endl '\n'
#define x first
#define y second    
#define int long long
#define double long double       
#define vec vector            
#define pb push_back
#define pii pair<int, int>
#define pdd pair<double, double> 
#define beg begin
#define print(x) cout << (x) << endl;
  
#ifdef LOCAL
    #define dbg(x) cerr << #x << " = " << x << endl;
#else 
    #define dbg(x)
#endif 
  
template<class T> ostream& operator<<(ostream &str, vector<T> &a) {
    for (auto &i : a) {
        str << i << " ";
    }
    return str;
}
  
template<class T> istream& operator>>(istream &str, vector<T> &a) {
    for (auto &i : a) {
        str >> i; 
    }
    return str;
}
  
template<class T> ostream& operator<<(ostream &str, pair<T, T> &a) {
    str << a.first << " " << a.second;
    return str;
}
  
template<class T> istream& operator>>(istream &str, pair<T, T> &a) {
    str >> a.first >> a.second;
    return str;
}
 
void solve(); signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);                                       
    // freopen("output.txt", "w", stdout);
#endif
    srand(time(0));
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout.setf(ios::fixed); cout.precision(6);
    solve();   
    return 0;
}

const int MAXN = 1e5 + 10, INF = 1e18; 

int n, m;
string s;
pii t[MAXN * 4];

void upd(int v, int tl, int tr, int id, int x) {
    if (tr < id || tl > id) {
        return; 
    }
    if (tl == tr) {
        t[v] = {x, id};
        return;
    }
    int tm = (tl + tr) / 2;
    upd(v * 2, tl, tm, id, x);
    upd(v * 2 + 1, tm + 1, tr, id, x);
    if (t[v * 2].x <= t[v * 2 + 1].x) {
        t[v] = t[v * 2];
    }
    else {
        t[v] = t[v * 2 + 1];
    }
}

pii gt(int v, int tl, int tr, int l, int r) {
    if (tr < l || tl > r) {
        return {INF, -1};
    }
    if (l <= tl && tr <= r) {
        return t[v];
    }
    int tm = (tl + tr) / 2;
    pii ans1 = gt(v * 2, tl, tm, l, r);
    pii ans2 = gt(v * 2 + 1, tm + 1, tr, l, r);
    if (ans1.x <= ans2.x) {
        return ans1;
    }
    else {
        return ans2;
    }
}

void solve() {
    cin >> n >> m;
    cin >> s;
    for (int i = 0; i < MAXN * 4; ++i) {
        t[i] = {INF, -1};
    }
    upd(1, 0, n, 0, 0); 

    vec<int> pr(n + 1, -1);
    for (int i = 1; i <= n; ++i) {
        pii cur = gt(1, 0, n, max(0ll, i - m), i);
        if (cur.x != INF && s[i] != '1') {
            pr[i] = cur.y;
            upd(1, 0, n, i, cur.x + 1);
        }
    }

    pii cur = gt(1, 0, n, n, n);
    if (cur.x == INF) {
        print(-1);
    }
    else {
        // print(cur.x);
        vec<int> ans;
        int i = n;
        while (i != -1) {
            ans.pb(i + 1);
            i = pr[i];
        }
        reverse(all(ans));
        vec<int> ans2;
        for (int i = 1; i < $(ans); ++i) {
            ans2.pb(ans[i] - ans[i - 1]);
        }
        cout << ans2 << endl;
    }
}




Measured memory_bytes: 9668