#include<bits/extc++.h>
#ifndef __unix__
#define readchar _getchar_nolock
#define fread_unlocked _fread_nolock
#else
#define readchar getchar_unlocked
#endif
#ifdef _debug 
#define dout(i) cout << #i << ' ' << i << ' '
#else 
#include<bits/stdc++.h>
#define dout(i) 0&&0
#endif
#pragma GCC optimize("unroll-loops,no-stack-protector,O3")
#define priority_queue __gnu_pbds::priority_queue
#define unordered_map __gnu_pbds::gp_hash_table
#define rep(_n) for(int __i = _n;__i--;)
#define rep0(_i, _n) for(int _i = 0; (_i)<(_n) ;++_i)
#define rep1(_i, _n) for(int _i = 1; (_i)<=(_n) ;++_i)
#define yn(i) ((i)?"Yes" : "No")
#define eout(i) {cout << (i) << '\n';exit(0);}
#define rout(i) {return cout << (i) << '\n', 0;}
#define multi int _T;for(read(_T);_T--;)
using namespace std;
using ll = long long;using ull = unsigned long long;using ul = unsigned;using db = double;
using __gnu_pbds::null_type;
// inline char readchar(){static const size_t bufsize = 1 << 16; static size_t p = 0, end = 0; static char buf[bufsize]; if (p == end) end = fread_unlocked(buf, sizeof(char), bufsize, stdin), p = 0; return p == end ? EOF : buf[p++]; }
inline void read(char &a){static char p; while(isspace(p = readchar())); a = p; }
inline void read(char *a){static char p; while(isspace(p = readchar())); *a = p, ++a; while(isgraph(p = readchar()))*a = p, ++a;}
inline void read(string &a){static char p; while(isspace(p = readchar())); a = p; while(isgraph(p = readchar()))a.push_back(p);}
template<typename T> inline void read(T& a){static char p; static bool b;while (!isdigit(p = readchar()))b = p == '-'; a = p ^ '0'; while (isdigit(p = readchar())) a *= 10, a += p ^ '0'; if(b)a *= -1; }
template<typename T1, typename T2> inline void read(pair<T1, T2> &a){read(a.first), read(a.second);}
template<typename T> inline void read(T begin, const T &end){while(begin != end)read(*begin), ++begin;}
inline void R(){} template<class T1, class... T2> inline void R(T1 &h, T2 &... e){read(h), R(e...);}
template<typename T> inline void write(T begin, const T &end){while(begin != end)cout << *begin << " \n"[next(begin) == end], ++begin;}
template<typename T> using rbtree = __gnu_pbds::tree<T,__gnu_pbds::null_type,less<T>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
template<typename T> inline ostream& operator << (ostream &ou, const vector<T> &a){for(auto it = a.begin();it != a.end();++it)ou << (it != a.begin() ? " " : "") << *it;return ou;}
template<typename T1, typename T2>inline istream& operator >> (istream &in, pair<T1, T2> &a){return in >> a.first >> a.second;}
template<typename T1, typename T2>inline ostream& operator << (ostream &ou, const pair<T1, T2> &b){return ou << b.first << ' ' << b.second;}
template<typename T> inline long long pow(long long v, long long t, const T &p){long long res = 1;for(;t;t >>= 1, v = v * v % p)if(t & 1)res = res * v % p;return res;}
const int maxn = 300010;
int n, m;
char w[maxn];
int lst[maxn];
struct sgt{
	// v first s second
	int v[maxn<<1], s[maxn<<1];
	sgt(){memset(v, 0x3f3f3f3f, sizeof(v));memset(s, 0, sizeof(s));};
	void add(int p, pair<int,int> nv, int l = 0, int r = n, int i = 1){
		if(p > r || p < l)return;
		if(l == r and p == l)tie(v[i], s[i]) = nv;
		else{
			int mid = l+r>>1;
			add(p, nv, l, mid, i<<1), add(p, nv, mid+1, r, i<<1|1);
			if(v[i<<1] < v[i<<1|1]){
				s[i] = s[i<<1];
				v[i] = v[i<<1];
			}
			else if(v[i<<1] > v[i<<1|1]){
				s[i] = s[i<<1|1];
				v[i] = v[i<<1|1];
			}
			else{
				s[i] = min(s[i<<1], s[i<<1|1]);
				v[i] = v[i<<1];
			}
		}

	}
	pair<int,int> query(int ql, int qr, int l = 0, int r = n, int i = 1){
		if(ql > r || qr < l)return {maxn, maxn};
		if(ql <= l and qr >= r)return {v[i], s[i]};
		else{
			int mid = l+r>>1;
			return min(query(ql, qr, l, mid, i<<1), query(ql, qr, mid+1, r, i<<1|1));
		}
	}
}tree;
signed main(){
	ios_base::sync_with_stdio(0), cin.tie(0);
	R(n, m);
	read(w, w+n+1);
	for(int i = 0;i <= n;++i)w[i] -= '0';
	if(w[0] == 1 || w[n] == 1)rout(-1);		
	for(int i = 1;i <= m;++i){
		if(w[i] == 0){
			tree.add(i, {1, i});
		}
		else lst[i] = -1;
	}
	for(int i = m+1;i <= n;++i){
		if(w[i] == 0){
			// dout(i) << i-m+1 << ' ' << i-1 << ' ';
			auto get = tree.query(i-m, i-1);
			// dout(get)<<'\n';
			++get.first;
			lst[i] = get.second;
			get.second = i;
			tree.add(i, get);
		}
	}

	// write(lst, lst+1+n);

	auto res = tree.query(n, n);
	if(res.first > n)rout(-1);
	vector<int> ans;
	int now = n;
	while(now != 0){
		ans.emplace_back(now);
		now = lst[now];
	}
	ans.emplace_back(0);
	// write(ans.begin(), ans.end());
	reverse(ans.begin(), ans.end());
	for(int i = 1;i < ans.size();++i)cout << ans[i]-ans[i-1] << " \n"[ans.size() == i+1];
}

Measured memory_bytes: 7160