import std.stdio, std.string, std.conv, std.range;
import std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, std.random, core.bitop;

enum inf = 1_001_001_001;
enum infl = 1_001_001_001_001_001_001L;
enum mod = 1_000_000_007L;


void main() {
    int N, M;
    scan(N, M);
    M = min(N, M);
    auto s = readln.chomp;
    auto over = s.map!(ch => ch == '1').array;
    auto dp = new int[](N + 1);
    dp[] = inf;
    dp[N] = 0;
    foreach (i ; N - M .. N) {
        if (over[i]) continue;
        dp[i] = 1;
    }

    auto st = SegmentTree!(int, min, inf)(N + 1);
    foreach (i ; N - M .. N + 1) {
        st.assign(i, dp[i]);
    }

    foreach_reverse (i ; 0 .. N - M) {
        if (over[i]) continue;
        dp[i] = st.query(i + 1, i + M + 1) + 1;
        st.assign(i, dp[i]);
    }

    debug {
        writeln(dp);
    }

    int[] ans;
    int pos = 0;

    while (pos < N) {
        bool canMove;

        foreach (i ; 1 .. M + 1) {
            if (dp[pos] - 1 == dp[pos + i]) {
                pos += i;
                ans ~= i;
                canMove = true;
                break;
            }
        }

        if (!canMove) {
            writeln(-1);
            return;
        }
    }

    writefln("%(%s %)", ans);
}

struct SegmentTree(T, alias op, T initValue = 0) {
    import std.functional : binaryFun;

    alias f = binaryFun!(op);

    T[] _data;
    int _treeSize, _lineSize = 1;

    // 配列の要素数 n だけ与えて初期化
    this(int n) {
        while (_lineSize < n) {
            _lineSize *= 2;
        }
        _treeSize = 2 * _lineSize - 1;
        _data = new T[](_treeSize);
        _data[] = initValue;
    }

    // 配列 a を与えて初期化
    this(T[] a) {
        auto n = a.length;
        while (_lineSize < n) {
            _lineSize *= 2;
        }
        _treeSize = 2 * _lineSize - 1;
        _data = new T[](_treeSize);
        _data[] = initValue;

        _data[_lineSize - 1 .. _lineSize - 1 + n] = a[];

        foreach_reverse (i; 0 .. _lineSize - 1) {
            _data[i] = f(_data[2 * i + 1], _data[2 * i + 2]);
        }
    }

    // a[i] = x
    void assign(int i, T x) {
        i += _lineSize - 1;
        _data[i] = x;

        while (i > 0) {
            i = (i - 1) / 2;
            _data[i] = f(_data[2 * i + 1], _data[2 * i + 2]);
        }
    }

    // a[i] = f(a[i], x)
    void act(int i, T x) {
        i += _lineSize - 1;
        _data[i] = f(_data[i], x);

        while (i > 0) {
            i = (i - 1) / 2;
            _data[i] = f(_data[2 * i + 1], _data[2 * i + 2]);
        }
    }

    alias add = act;

    // 要求区間 [a, b) に対して、対象区間 [l, r) の値を返す
    T query(int a, int b, int k = 0, int l = 0, int r = -1) {
        if (r == -1) {
            r = _lineSize;
        }
        if (a >= b) { // 要求区間が空である場合
            return initValue;
        }
        if (b <= l || r <= a) { // 要求区間が対象区間外の場合
            return initValue;
        }
        if (a <= l && r <= b) { // 要求区間が対象区間に含まれている場合
            return _data[k];
        }

        // どちらでもない場合は対象区間を２つに分けて再帰する

        auto leftValue = query(a, b, 2 * k + 1, l, l + (r - l) / 2);
        auto rightValue = query(a, b, 2 * k + 2, l + (r - l) / 2, r);

        return f(leftValue, rightValue);
    }
}

void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}

void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

bool chmin(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x > arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}

bool chmax(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x < arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}


Measured memory_bytes: 4476