// Original C++ solution (slower):
#include <iostream>

#include <string>

#include <vector>

#include <algorithm>

#include <map>

#include <set>

#include <unordered_map>

#include <unordered_set>

#include <queue>

#include <iomanip>

#include <bitset>

#include <cassert>

#include <cmath>

#include <cstring>

#include <climits>



using namespace std;



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

#define REP(i, n) FOR(i, 0, n)

#define SORT(c) sort((c).begin(), (c).end())



typedef long long ll;

typedef pair<int, int> P;

typedef vector<int> V;

typedef map<int, int> M;



constexpr ll INF = 1e18;

constexpr ll MOD = 1e9 + 7;

constexpr double PI = 3.14159265358979323846;

constexpr int di[] = {0, 0, 1, -1};

constexpr int dj[] = {1, -1, 0, 0};



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);



    int n, m;

    string s;



    cin >> n >> m >> s;



    P dp[112345];



    memset(dp, -1, sizeof(dp));



    priority_queue<P, vector<P>, greater<P>> q;



    q.push({0, 0});



    for (int i = 1; i <= n; i++)

    {

        if (s[i] == '1')

            continue;



        P p = {-1, -1};



        while (q.size())

        {

            P p_ = q.top();



            if (i - p_.second <= m)

            {

                p = p_;

                break;

            }



            q.pop();

        }



        if (p.first == -1)

            continue;



        dp[i].first = p.first + 1;

        dp[i].second = p.second;



        q.push({dp[i].first, i});

    }



    V res;



    int i = n;



    if (dp[n].first == -1)

    {

        cout << -1 << endl;

        return 0;

    }



    while (i > 0)

    {

        res.push_back(i - dp[i].second);

        i = dp[i].second;

    }



    reverse(res.begin(), res.end());



    REP(i, res.size())

    cout << res[i] << (i < res.size() - 1 ? " " : "\n");



    /*

    for (int i = 1; i <= n; i++)

        cout << dp[i].first << " ";



    cout << endl;



    for (int i = 1; i <= n; i++)

        cout << dp[i].second << " ";

        */



    return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

#include <string>

#include <vector>

#include <algorithm>

#include <map>

#include <set>

#include <unordered_map>

#include <unordered_set>

#include <queue>

#include <iomanip>

#include <bitset>

#include <cassert>

#include <cmath>

#include <cstring>

#include <climits>



using namespace std;



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

#define REP(i, n) FOR(i, 0, n)

#define SORT(c) sort((c).begin(), (c).end())



typedef long long ll;

typedef pair<int, int> P;

typedef vector<int> V;

typedef map<int, int> M;



constexpr ll INF = 1e18;

constexpr ll MOD = 1e9 + 7;

constexpr double PI = 3.14159265358979323846;

constexpr int di[] = {0, 0, 1, -1};

constexpr int dj[] = {1, -1, 0, 0};



int main()

{

    ios::sync_with_stdio(false);

    cin.tie(0);



    int n, m;

    string s;



    cin >> n >> m >> s;



    V res;



    int i = n;



    while (i > 0)

    {

        for (int j = max(0, i - m); j <= i; j++)

        {

            if (s[j] == '0')

            {

                if (j == i)

                {

                    cout << -1 << endl;

                    return 0;

                }



                res.push_back(i - j);



                i = j;

                break;

            }

        }

    }



    for (int i = res.size() - 1; i >= 0; i--)

        cout << res[i] << (i == 0 ? "\n" : " ");



    return 0;

}

// Fastest known solution for this problem: