#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vld = vector<ld>;
using vvld = vector<vld>;
using vvvld = vector<vvld>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
#define rep(i, n) for(ll i = 0, i##_end = (n); i < i##_end; i++)
#define repb(i, n) for(ll i = (n)-1; i >= 0; i--)
#define repr(i, a, b) for(ll i = (a), i##_end = (b); i < i##_end; i++)
#define reprb(i, a, b) for(ll i = (b)-1, i##_end = (a); i >= i##_end; i--)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
const ll MOD = 1000000007;
const ll INF = 100000000000000000LL;
const ld EPS = 1e-12L;
const ld PI = 3.1415926535897932385L;
inline ll GCD(ll a, ll b){ return b?GCD(b, a % b):a; }
inline ll LCM(ll a, ll b){ return a/GCD(a, b)*b; }
inline ll powmod(ll x, ll y, ll m = MOD){ ll r=1; while(y){ if(y&1) r*=x; x*=x; r%=m; x%=m; y>>=1; } return r; }
template<class S, class T>inline bool chmax(S &a, const T &b){ if(a<b) { a=b; return 1; } return 0; }
template<class S, class T>inline bool chmin(S &a, const T &b){ if(b<a) { a=b; return 1; } return 0; }
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif

// http://beet-aizu.hatenablog.com/entry/2017/09/10/132258
template <typename T, typename E>
struct SegmentTree {
    using F = function<T(T, T)>;
    using G = function<T(T, E)>;
    int n;                       // 葉の数
    F f;                         // 二項演算
    G g;                         // 点更新処理
    T d1;                        // 単位元
    vector<T> dat;               // データ
    SegmentTree(){};
    // 葉の数、二項演算、点更新処理、単位元、初期配列
    // 二項演算はa.(b.c) == (a.b).c && d1.a == a.d1 == aが必要
    SegmentTree(int n_, F f, G g, T d1, vector<T> v = vector<T>())
        : f(f), g(g), d1(d1) {
        init(n_);
        if(n_ == (int)v.size()) build(n_, v);
    }
    void init(int n_) {
        n = 1;
        while(n < n_) n *= 2;
        dat.clear();
        dat.resize(2 * n - 1, d1);
    }
    void build(int n_, vector<T> v) {
        for(int i = 0; i < n_; i++)
            dat[i + n - 1] = v[i];
        for(int i = n - 2; i >= 0; i--)
            dat[i] = f(dat[i * 2 + 1], dat[i * 2 + 2]);
    }
    void update(int k, E a) {
        k += n - 1;
        dat[k] = g(dat[k], a);
        while(k > 0) {
            k = (k - 1) / 2;
            dat[k] = f(dat[k * 2 + 1], dat[k * 2 + 2]);
        }
    }
    // [a, b)
    inline T query(int a, int b) {
        T vl = d1, vr = d1;
        for(int l = a + n, r = b + n; l < r; l >>= 1, r >>= 1) {
            if(l & 1) vl = f(vl, dat[(l++) - 1]);
            if(r & 1) vr = f(dat[(--r) - 1], vr);
        }
        return f(vl, vr);
    }
};

template<class T>
void PrintVector(vector<T>& vec){
    int n = vec.size();
    for(int i = 0; i < n; i++){
        cout << vec[i] << (i == n-1 ? "\n" : " ");
    }
}

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n, m;
    cin >> n >> m;
    string s;
    cin >> s;
    SegmentTree<ll, ll> seg(n+1+m, [](ll a, ll b){return min(a,b);}, [](ll a, ll b){return b;}, INF);
    seg.update(n, 0);
    repb(i, n)if(s[i] != '1'){
        seg.update(i, 1+seg.query(i+1, i+m+1));
    }
    dump(seg.query(0, 1));
    ll ns = seg.query(0, 1);
    if(ns >= INF){
        cout << -1 << endl;
        return 0;
    }
    vll ans;
    ll c = ns-1;
    ll pos = 0;
    rep(i, n+1){
        if(seg.query(i, i+1) == c){
            ans.emplace_back(i-pos);
            pos = i;
            c--;
        }
    }
    PrintVector(ans);
    return 0;
}

Measured memory_bytes: 4560