#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma comment(linker, "/stack:200000000")
 
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
 
#define X first
#define Y second
 
//#include <boost/unordered_map.hpp>
//using namespace boost;
 
/*
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbtree;
rbtree T;
*/
 
using i32 = int;
using i64 = long long;
using u8 = unsigned char;
using u32 = unsigned;
using u64 = unsigned long long;
using f64 = double;
using f80 = long double;
//using i128 = __int128_t;
//using u128 = __uint128_t;
//using i128 = i64;
//using u128 = u64;
 
ll power(ll a, ll b, ll p)
{
	if (!b) return 1;
	ll t = power(a, b/2, p);
	t = t*t%p;
	if (b&1) t = t*a%p;
	return t;
}
 
ll exgcd(ll a, ll b, ll &x, ll &y)
{
	if (b == 0)
	{
		x = 1;
		y = 0;
		return a;
	}
	ll px, py;
	ll d = exgcd(b, a%b, px, py);
	x = py;
	y = px-a/b*py;
	return d;
}

ll gcd(ll a, ll b)
{
	return b ? gcd(b, a%b) : a;
}
 
template<class T>
inline void freshmin(T &a, const T &b)
{
	if (a > b) a = b;
}
 
template<class T>
inline void freshmax(T &a, const T &b)
{
	if (a < b) a = b;
}

template<class T>
void print(const T &a)
{
	for (auto x : a) printf("%d ", x); puts("");
}

const int MAXN = 500010;
//const int MAXM = 100010;
const int MAXK = 30;
//const i64 INF = 1000000000000000000LL;
const int INF = 1000000000;
//const int MOD = 998244353;
const int B = 31;
const int MOD = 1000000007;
//const int INV2 = (MOD+1)/2;
const ld pi = 3.1415926535897932384626433;

int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};

#define rep(i,a,b) for (int i = (a), I = (b); i <= I; ++ i)

int days[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

bool leap(int y)
{
	return y%4 == 0 && y%100 != 0 || y%400 == 0;
}

template<class data_type>
struct segment_tree
{
	using T = data_type;
	int n;
	vector<T> a;
	
	using initialize_type = function<void(T&, int)>;
	using merge_type = function<void(T&, const T&, const T&)>;
	using pushdown_type = function<void(T&, int, int, T&, T&)>;
	initialize_type initialize;
	merge_type merge;
	pushdown_type pushdown;
	
	void clear(int k, int L, int R)
	{
		pushdown(a[k], L, R, a[k<<1], a[k<<1|1]);
	}
	void update(int k)
	{
		merge(a[k], a[k<<1], a[k<<1|1]);
	}
	void build(int k, int L, int R)
	{
		if (L == R)
		{
			initialize(a[k], L);
			return;
		}
		int m = (L+R)>>1;
		build(k<<1, L, m);
		build(k<<1|1, m+1, R);
		update(k);
	}
	segment_tree(int n, const initialize_type &initialize, const merge_type &merge, const pushdown_type &pushdown)
	{
		assert(n >= 1);
		this->n = n;
		this->initialize = initialize;
		this->merge = merge;
		this->pushdown = pushdown;
		a = vector<T>(4*n+1);
		build(1, 1, n);
	}
	
	using modifier_type = function<void(T&, int, int)>;
	void modify(int k, int L, int R, int x, int y, const modifier_type &modifier)
	{
		if (L == x && R == y)
		{
			modifier(a[k], L, R);
			return;
		}
		int m = (L+R)>>1;
		clear(k, L, R);
		if (y <= m)
			modify(k<<1, L, m, x, y, modifier);
		else if (x > m)
			modify(k<<1|1, m+1, R, x, y, modifier);
		else
		{
			modify(k<<1, L, m, x, m, modifier);
			modify(k<<1|1, m+1, R, m+1, y, modifier);
		}
		update(k);
	}
	void modify(int x, int y, const modifier_type &modifier)
	{
		assert(1 <= x && x <= y && y <= n);
		modify(1, 1, n, x, y, modifier);
	}
	
	template<class result_type, class convert_type = function<result_type(const T&)>, class calculate_type = function<result_type(const result_type&, const result_type&)>>
	result_type query(int k, int L, int R, int x, int y, const convert_type &convert, const calculate_type &calculate)
	{
		if (L == x && R == y)
			return convert(a[k]);
		int m = (L+R)>>1;
		clear(k, L, R);
		if (y <= m)
			return query<result_type>(k<<1, L, m, x, y, convert, calculate);
		if (x > m)
			return query<result_type>(k<<1|1, m+1, R, x, y, convert, calculate);
		return calculate(query<result_type>(k<<1, L, m, x, m, convert, calculate), query<result_type>(k<<1|1, m+1, R, m+1, y, convert, calculate));
	}
	template<class result_type, class convert_type = function<result_type(const T&)>, class calculate_type = function<result_type(const result_type&, const result_type&)>>
	result_type query(int x, int y, const convert_type &convert, const calculate_type &calculate)
	{
		assert(1 <= x && x <= y && y <= n);
		return query<result_type>(1, 1, n, x, y, convert, calculate);
	}
	
	T query(int x, int y)
	{
		assert(1 <= x && x <= y && y <= n);
		function<T(const T&)> convert = [](const T &it) -> T
		{
			return it;
		};
		function<T(const T&, const T&)> calculate = [&](const T &Lc, const T &Rc) -> T
		{
			T ret;
			merge(ret, Lc, Rc);
			return ret;
		};
		return query<T>(x, y, convert, calculate);
	}
};


int n, m;
char s[MAXN];
pii f[MAXN];

void solve()
{
	scanf("%d%d%s", &n, &m, s);
	
	using node = pii;
	auto initialize = [&](node &it, int id) -> void
	{
		it = {INF, id};
		if (id == n) it = {0, id};
	};
	auto merge = [&](node &it, const node& Lc, const node& Rc) -> void
	{
		it = min(Lc, Rc);
	};
	auto pushdown = [&](node &it, int L, int R, node &Lc, node &Rc) -> void
	{
	};
	segment_tree<node> H(n, initialize, merge, pushdown);
	
	for (int i = n-1; i >= 0; -- i)
	{
		if (s[i] == '1') continue;
		auto it = H.query(i+1, min(i+m, n));
		f[i] = pii(it.X+1, it.Y);
		if (i)
		H.modify(i, i, [&](node& it, int L, int R)
		{
			it = {f[i].X, i};
		});
	}
	
	if (f[0].X >= INF)
	{
		puts("-1");
		return;
	}
	
	int flag = 0;
	for (int i = 0; i != n; i = f[i].Y)
	{
		if (flag) putchar(' ');
		flag = 1;
		printf("%d", f[i].Y-i);
	}
	puts("");
}

int main()
{
	
	int T;
	T = 1;
	//scanf("%d", &T);
	while (T --)
	solve();
	
	return 0;
}


Measured memory_bytes: 6400