#include <bits/stdc++.h>
using namespace std;

// エイリアス
using  ll = long signed long;
using ull = long unsigned long;
using  ld = long double;
using   P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;

// 汎用マクロ
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(i,q) for (auto &i : q)
#define UNIQUE(v) do { sort((v).begin(), (v).end()); (v).erase(unique((v).begin(), (v).end()), (v).end()); } while (false)
#define SZ(x) ((int)(x).size())
template <class T>inline bool chmin(T &a, const T b) {if (a > b) { a = b; return true;} return false;}
template <class T>inline bool chmax(T &a, const T b) {if (a < b) { a = b; return true;} return false;}
template <class T>inline void line_out(const vector<T> vec) {int n = SZ(vec); rep(i, n) { cout << vec[i]; if(i < n-1) cout << " ";}cout << endl;}
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 28;
const ll INF64 = 1ll << 60;
const int mod = 1000000007;
//const int mod = 998244353;
struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint &operator++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};

//第二引数にfalseを入れると最大値取得
struct SegmentTree {
  private:
  int n;
  int sz;
  vector<ll> node;
  bool is_min;
  public:
  SegmentTree(vector<ll> v, bool flag = true) {
    sz = v.size();
    is_min = flag;
    n = 1; while(n < sz) n *= 2;
    node.resize(2*n-1, (is_min ? 1 : -1) * INF64);
    for(int i = 0; i < sz; ++i) node[i+n-1] = v[i];
    for(int i = n-2; i >= 0; --i) {
      if(is_min) node[i] = min(node[2*i+1], node[2*i+2]);
      else node[i] = max(node[2*i+1], node[2*i+2]);
    }
  }
  void update(int x, ll val) {
    x += (n-1);
    node[x] = val;
    while(x > 0) {
      x = (x-1)/2;
      if(is_min) node[x] = min(node[2*x+1], node[2*x+2]);
      else node[x] = max(node[2*x+1], node[2*x+2]);
  }
  }
  //[a, b) 区間の最大／最小値
  ll get_val(int a, int b, int k = 0, int l = 0, int r=-1) {
    if(r < 0) r = n;
    if(r <= a || b <= l) return (is_min ? 1 : -1) * INF64;
    if(a <= l && r <= b) return node[k];
    ll vl = get_val(a, b, 2*k+1, l, (l+r)/2);
    ll vr = get_val(a, b, 2*k+2, (l+r)/2, r);
    if(is_min) return min(vl, vr);
    else return max(vl, vr);
  }
  vector<ll> get_vec() {
    vector<ll> res;
    rep(i, sz) res.push_back(node[i+n-1]);
    return res;
  }
  ll get_node(int x) {
    return node[x+n-1];
  }
};

int main()
{
  int n, m;
  string s;
  cin >> n >> m >> s;
  SegmentTree dp(vector<ll>(n+1, INF64));
  dp.update(0, 0);
  vector<ll> dist(n+1, -1);
  dist[0] = 0;
  for(int i = 1; i < n+1; ++i) {
    if(s[i] == '1') continue;
    ll val = dp.get_val(max(0, i-m), i);
    if(val == INF64) break;

    dp.update(i, val+1);
    dist[i] = val+1;
  }
  if(dist[n] == -1) cout << -1 << endl;
  else {
    vector<ll> ans;
    int now = n;
    while(now > 0) {
      int to;
      for(int i = 1; i <= m; ++i) {
        if(now-i < 0) break;
        if(dist[now-i] == dist[now]-1) to = now-i;
      }
      ans.push_back(now-to);
      now = to;
    }
    reverse(ALL(ans));
    line_out(ans);
  }
}


Measured memory_bytes: 7832