#include <iostream>
#include <vector>
#include <limits.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <queue>
#include <map>
#include <set>
#include <iomanip>
#include <bitset>
#include <cassert>
#include <random>
#include <functional>
#include <stack>
#include <iomanip>
#include <cassert>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
#include <list>

using namespace std;
//std::ios::sync_with_stdio(false);
//std::cin.tie(0);
const long long MOD = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ll> pdl;
typedef pair<ld, ld> pdd;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
//typedef boost::multiprecision::cpp_int bigint;

//空vectorを要素数NのsegTreeとしてzで初期化
template<class T>
void segTree_init(vector<T>& vec, int N, T z) {
	int RN = 1;
	while (RN < N)RN *= 2;
	vec.resize(2 * RN, z);
}

//vecをsegTreeとしてn番目をxに
template<class T>
void segTree_set(vector<T>& vec, int n, T x, function<T(T, T)> f, int k = -1) {
	int RN = (vec.size() + 1) / 2;
	if (k == -1) {
		k = n + RN;
		vec[k] = x;
		segTree_set(vec, n, x, f, k / 2);
	}
	else if (k != 0) {
		vec[k] = f(vec[2 * k], vec[2 * k + 1]);
		segTree_set(vec, n, x, f, k / 2);
	}
}

//vecがsegTreeの時の、n番目の要素
template<class T>
T segTree_at(vector<T>& vec, int n) {
	int RN = (vec.size()) / 2;
	return vec[RN + n];
}

//get [a,b]
template<class T>
T segTree_get(vector<T>& vec, int a, int b, function<T(T, T)> f, T e, int k = 1, int l = 0, int r = -1) {
	if (r == -1)r = vec.size() / 2 - 1;
	if (b < l || r < a)return e;
	else if (a <= l && r <= b)return vec[k];
	else return f(
		segTree_get(vec, a, b, f, e, 2 * k, l, (l + r) / 2),
		segTree_get(vec, a, b, f, e, 2 * k + 1, (l + r) / 2 + 1, r)
	);
}

struct query {
	ll pos, first, second;
};
typedef pair<pll, ll> P;

function<P(P, P)> lambda = [](P a, P b) {
	if (a.first.first < b.first.first)return a;
	else if (a.first.first > b.first.first)return b;
	else if (a.second < b.second)return a;
	else return b;
};


int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	ll N, M;
	string S;
	vector<ll> MAP;   //1->out
	vector<P> seg;
	cin >> N >> M >> S;
	MAP.resize(N + 1);
	for (ll n = 0; n <= N; n++) {
		if (S[n] == '1')MAP[n] = 1;
		else MAP[n] = 0;
	}
	segTree_init(seg, N + 1, P(pll(LLONG_MAX,N),N));
	segTree_set(seg, N, P(pll(0,N),N), lambda);
	for (ll n = 0; n < N; n++) {
		segTree_set(seg, n, P(pll(LLONG_MAX,N),n), lambda);
	}
	for (ll n = N - 1; n >= 0; n--) {
		if (MAP[n] == 1)continue;
		P res = segTree_get(seg, n + 1, min(n + M, N), lambda, P(pll(LLONG_MAX, N), N));
		if (res.first.first == LLONG_MAX)continue;
		P ans = P(pll(res.first.first + 1, res.second), n);
		segTree_set(seg, n, ans, lambda);
	}
	P cur = segTree_get(seg, 0, 0, lambda, P(pll(LLONG_MAX, N), N));
	if (cur.first.first == LLONG_MAX)cout << -1 << "\n";
	else {
		vector<ll> ans;
		while (cur.second != N) {
			ans.push_back(cur.first.second - cur.second);
			cur = segTree_get(seg, cur.first.second, cur.first.second, lambda, P(pll(LLONG_MAX, N), N));
		}
		for (ll n = 0; n < ans.size() - 1; n++)cout << ans[n] << " ";
		cout << ans.back() << "\n";
	}
	return 0;
}

Measured memory_bytes: 8392