#include <bits/stdc++.h>
#define endl '\n'
#define int long long
#define lint long long
#define pii pair<int, int>
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) (v).begin(), (v).end()
#define SZ(v) ((int)v.size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define MINF(a) memset(a, 0x3f, sizeof(a))
#define POW(n) (1LL << (n))
#define POPCNT(n) (__builtin_popcount(n))
#define IN(i,a,b) (a <= i && i <= b)
using namespace std;
template <typename T> inline bool CHMIN(T& a,T b) { if(a>b) { a=b; return 1; } return 0; }
template <typename T> inline bool CHMAX(T& a,T b) { if(a<b) { a=b; return 1; } return 0; }
template <typename T> inline void SORT(T& a) { sort(ALL(a)); }
template <typename T> inline void REV(T& a) { reverse(ALL(a)); }
template <typename T> inline void UNI(T& a) { sort(ALL(a)); a.erase(unique(ALL(a)),a.end()); }
template <typename T> inline T LB(vector<T>& v, T a) { return *lower_bound(ALL(v),a); }
template <typename T> inline int LBP(vector<T>& v, T a) { return lower_bound(ALL(v),a) - v.begin(); }
template <typename T> inline T UB(vector<T>& v, T a) { return *upper_bound(ALL(v),a); }
template <typename T> inline int UBP(vector<T>& v, T a) { return upper_bound(ALL(v),a) - v.begin(); }
template <typename T1, typename T2> ostream& operator<< (ostream& os, const pair<T1,T2>& p) { os << p.first << " " << p.second; return os; }
template <typename T1, typename T2> istream& operator>> (istream& is, pair<T1,T2>& p) { is >> p.first >> p.second; return is; }
template <typename T> ostream& operator<< (ostream& os, const vector<T>& v) { REP(i,v.size()) { if (i) os << " "; os << v[i]; } return os; }
template <typename T> istream& operator>> (istream& is, vector<T>& v) { for(T& in : v) is >> in; return is; }
template <typename T = int> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...)); }
template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; }
template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for(auto &e : t) fill_v(e, v); }
const lint MOD = 1000000007;
const lint INF = 0x3f3f3f3f3f3f3f3f;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

// セグメント木
template <class M> class ST {
    void init(int _n) {
        for (n = 1, lev = 0; n < _n; n <<= 1, ++lev);
        d.assign(n << 1, u1);
    }

public:
    int n, lev;
    vector<M> d;
    virtual void assign(int, M) = 0;    // 更新処理
    virtual M f(M, M) = 0;              // モノイドの演算
    const M u1;                         // モノイドの単位元

    ST(M u1) : u1(u1) {}

    // 構築
    void build(const vector<M>& v) {
        int _n = v.size();
        init(_n);
        for (int i = 0; i < _n; ++i) d[n + i] = v[i];
        for (int i = n - 1; i > 0; --i) d[i] = f(d[(i << 1) | 0], d[(i << 1) | 1]);
    }
    void build(int _n) { init(_n); }

    // k番目の要素をxに更新 (k: 0-indexed)
    void update(int k, M x) {
        assign(k, x);
        k += n;
        while (k >>= 1) d[k] = f(d[(k << 1) | 0], d[(k << 1) | 1]);
    }

    // 半開区間 [a, b) に対するクエリ (a, b: 0-indexed)
    M query(int a, int b) {
        M L = u1, R = u1;
		for (int l = a + n, r = b + n; l < r; l >>= 1, r >>= 1) {
            if (l & 1) L = f(L, d[l++]);
            if (r & 1) R = f(d[--r], R);
		}
        return f(L, R);
    }
    M query(int a) { return query(a, a + 1); }
};

// Range Minimum Query (RmQ)
template <class M>
struct RmQ : public ST<M> {
    using ST<M>::ST;
    RmQ(const M u1) : ST<M>(u1) {}
    M f(M a, M b) override { return min(a, b); }
    void assign(int k, M x) override { this->d[k + this->n] = x; }
};

int N, M;
string S;

void _main() {
    cin >> N >> M >> S;
    int cnt = 0;
    REP(i, N) {
        if (S[i] == '1') {
            ++cnt;
            if (cnt == M) {
                cout << -1 << endl;
                return;
            }
        } else {
            cnt = 0;
        }
    }
    RmQ<pii> rmq(pii(INF, INF));
    rmq.build(N + 1);
    rmq.update(N, pii(0, N));
    vector<int> dp(N + 1, -1);
    for (int i = N - 1; i >= 0; --i) {
        if (S[i] == '1') continue;
        auto p = rmq.query(i + 1, min(N, i + M) + 1);
        dp[i] = p.second - i;
        rmq.update(i, pii(p.first + 1, i));
    }
    vector<int> ans;
    int i = 0;
    while (i < N) {
        ans.push_back(dp[i]);
        i += dp[i];
    }
    cout << ans << endl;
}

signed main(signed argc, char **argv) {
    if (argc > 1) {
        if (strchr(argv[1], 'i')) freopen("input.txt", "r", stdin);
        if (strchr(argv[1], 'o')) freopen("output.txt", "w", stdout);
    }
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
    _main();
    return 0;
}

Measured memory_bytes: 6344