#include <bits/stdc++.h>
// using namespace std;
using i64 = int_fast64_t;
#define repeat(i, a, b) for(int i = (a); (i) < (b); ++(i))
#define rep(i, n) repeat(i, 0, n)

namespace edamat {
template <class T, class Op>
class aggregatable_queue {
    // todo:dequeになってない（今はqueue）
   private:
    class node {
       public:
        T val, sum;
        node(const T &val, const T &sum) : val(val), sum(sum) {}
    };

    Op op;
    std::stack<node> front_stack, back_stack;
    std::stack<T> tmp_stack;

    void split_to_front() {
        assert(!empty());
        // backに残す分をいったんtmpに移す
        const int N = back_stack.size();
        while(tmp_stack.size() < N / 2) {
            T q = back_stack.top().val;
            back_stack.pop();
            tmp_stack.push(q);
        }
        // backの前半分をfrontに移す
        assert(!back_stack.empty());
        front_stack.emplace(back_stack.top().val, back_stack.top().val);
        back_stack.pop();
        while(!back_stack.empty()) {
            T s{op(back_stack.top().val, front_stack.top().sum)};
            front_stack.emplace(back_stack.top().val, s);
            back_stack.pop();
        }
        // いったん移しておいたtmpからbackに戻す
        if(tmp_stack.empty()) return;
        back_stack.emplace(tmp_stack.top(), tmp_stack.top());
        tmp_stack.pop();
        while(!tmp_stack.empty()) {
            T s{op(tmp_stack.top(), back_stack.top().sum)};
            back_stack.emplace(tmp_stack.top(), s);
            tmp_stack.pop();
        }
    }

   public:
    aggregatable_queue(const Op &op = Op())
        : op(op), front_stack(), back_stack() {}

    bool empty() const { return front_stack.empty() && back_stack.empty(); }

    std::size_t size() const { return front_stack.size() + back_stack.size(); }

    T fold_all() const {
        assert(!empty());
        if(front_stack.empty()) {
            return back_stack.top().sum;
        } else if(back_stack.empty()) {
            return front_stack.top().sum;
        } else {
            return op(front_stack.top().sum, back_stack.top().sum);
        }
    }

    void push_back(const T &x) {
        if(back_stack.empty()) {
            back_stack.emplace(x, x);
        } else {
            T s{op(back_stack.top().sum, x)};
            back_stack.emplace(x, s);
        }
    }

    void pop_front() {
        assert(!empty());
        if(front_stack.empty()) {
            split_to_front();
        }
        front_stack.pop();
    }

    // ! front()とback()を定義しようとすると，片方が空のときに死ぬ
};
}  // namespace edamat

void ABC146_F() {
    /*
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    */
    int n, m;
    std::cin >> n >> m;
    std::string s;
    std::cin >> s;

    struct node {
        int step;
        int idx;
    };
    const auto f = [](const node &l, const node &r) {
        if(l.step == r.step)
            return l.idx < r.idx ? l : r;
        else
            return l.step < r.step ? l : r;
    };

    edamat::aggregatable_queue<node, decltype(f)> qa(f);
    std::vector<int> next(n + 1);
    qa.push_back({0, n});
    constexpr int Inf = std::numeric_limits<int>::max() / 2;
    int ans;
    for(int i = n - 1; i >= 0; i--) {
        if(qa.size() > m) {
            qa.pop_front();
        }
        const node t = qa.fold_all();
        // std::cout << t.step << " " << t.idx << std::endl;
        next[i] = t.idx;
        if(i == 0) {
            ans = t.step + 1;
        }
        if(s[i] == '0') {
            qa.push_back({t.step + 1, i});
        } else {
            qa.push_back({Inf, i});
        }
    }
    if(ans >= Inf) {
        std::cout << "-1" << std::endl;
        return;
    }
    int p = 0;
    while(p != n) {
        // std::cout << next[p] << " ";
        std::cout << next[p] - p << ' ';
        p = next[p];
    }
    std::cout << std::endl;
}

int main() {
    ABC146_F();
    return 0;
}

Measured memory_bytes: 2304