/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aryssoncf
 */

#include <bits/stdc++.h>
//
// Created by aryssoncf on 28/10/2019.
//

#include <type_traits>


#include <iterator>
#include <utility>

template<typename T>
constexpr auto hasBegin(int) -> decltype(std::begin(std::declval<T>()), true) {
    return true;
}

constexpr bool hasBegin(...) {
    return false;
}

template<typename T>
using IsContainer = std::integral_constant<bool, hasBegin<T>(0)>;


#ifndef JHELPER_EXAMPLE_PROJECT_IO_HPP
#define JHELPER_EXAMPLE_PROJECT_IO_HPP

#endif //JHELPER_EXAMPLE_PROJECT_IO_HPP

template<class X, class Y>
std::ostream &operator<<(std::ostream &os, std::pair<X, Y> const &p) {
    return os << p.first << " " << p.second;
}

template<class Ch, class Tr, class Container>
std::basic_ostream<Ch, Tr> &operator<<(std::basic_ostream<Ch, Tr> &os, Container const &x) {
    bool first = true;
    for (auto &y : x) {
        if (first) {
            first = false;
        } else {
            os << " ";
        }
        os << y;
    }
    return os;
}


#include <functional>
#include <queue>


#include <string>
#include <stdexcept>

#ifndef SPCPPL_ASSERT
#ifdef SPCPPL_DEBUG
#define SPCPPL_ASSERT(condition) \
        if(!(condition)) { \
            throw std::runtime_error(std::string() + #condition + " in line " + std::to_string(__LINE__) + " in " + __PRETTY_FUNCTION__); \
        }
#else
#define SPCPPL_ASSERT(condition)
#endif
#endif


template<typename T, typename Compare = std::less<T>>
class MinQueue {
public:
    explicit MinQueue(Compare compare = Compare()) : size_(0), compare(compare) {
    }

    void push(const T &value) {
        push_impl(value);
    }

    void push(T &&value) {
        push_impl(std::move(value));
    }

    void pop() {
        SPCPPL_ASSERT(!queue.empty());
        if (--queue.front().second == 0) {
            queue.pop_front();
        }
        --size_;
    }

    std::size_t size() const {
        return size_;
    }

    const T &getMinimum() const {
        SPCPPL_ASSERT(!queue.empty());
        return queue.front().first;
    }

private:
    template<typename U>
    void push_impl(U &&value) {
        static_assert(std::is_same<U, T>::value || std::is_same<U, const T &>::value, "");
        size_t elementsWithFixedMin = 1;
        while (!queue.empty() && !compare(queue.back().first, value)) {
            elementsWithFixedMin += queue.back().second;
            queue.pop_back();
        }
        queue.emplace_back(std::forward<U>(value), elementsWithFixedMin);
        ++size_;
    }

    std::size_t size_;
    std::deque<std::pair<T, std::size_t>> queue;
    Compare compare;
};

using namespace std;

class FSugoroku {
public:
    void solve(std::istream &in, std::ostream &out) {
        int n, m;
        in >> n >> m;
        string str;
        in >> str;
        int INF = 2 * n;
        vector<int> dp(n + 1), nex(n + 1);
        nex[n] = -1;
        MinQueue<pair<int, int>> Q;
        Q.push({0, n});
        for (int i = n - 1; i >= 0; --i) {
            if (i + m + 1 <= n) {
                Q.pop();
            }
            if (str[i] == '1') {
                dp[i] = INF;
                nex[i] = -1;
            } else {
                auto aux = Q.getMinimum();
                dp[i] = aux.first + 1;
                nex[i] = aux.second;
            }
            Q.push({dp[i], i});
        }
        if (dp[0] > n) {
            out << -1 << "\n";
        } else {
            vector<int> res;
            for (int pos = 0; pos < n; pos = nex[pos]) {
                res.push_back(nex[pos] - pos);
            }
            out << res << "\n";
        }
    }

    void setup() {}
};


int main() {
    std::ios_base::sync_with_stdio(false);
    FSugoroku solver;
    solver.setup();
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    in.tie(nullptr);
    out << std::fixed;
    out.precision(20);
    solver.solve(in, out);
    return 0;
}


Measured memory_bytes: 1868