import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd


def input():
    return sys.stdin.readline().strip()


def STR():
    return input()


def INT():
    return int(input())


def FLOAT():
    return float(input())


def MAP():
    return map(int, input().split())


def S_MAP():
    return map(str, input().split())


def LIST():
    return list(map(int, input().split()))


def S_LIST():
    return list(map(str, input().split()))


def lcm(a, b):
    return a * b // gcd(a, b)


sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
n, m = MAP()
s = STR()
ans = []
i = n
while i > 0:
    if s[i] == '0':
        prei = i
        for j in reversed(range(1, m + 1)):
            if i - j >= 0 and s[i - j] == '0':
                ans.append(str(j))
                i -= j
                break
        if i == prei:
            print(-1)
            exit()
ans.reverse()
print(' '.join(ans))

a9b132cdfd22012f753be08503bc76e1f9d9f84e
<mask token>


def STR():
    return input()


<mask token>


def LIST():
    return list(map(int, input().split()))


<mask token>

<mask token>


def STR():
    return input()


def INT():
    return int(input())


def FLOAT():
    return float(input())


def MAP():
    return map(int, input().split())


<mask token>


def LIST():
    return list(map(int, input().split()))


def S_LIST():
    return list(map(str, input().split()))


def lcm(a, b):
    return a * b // gcd(a, b)


<mask token>

<mask token>


def input():
    return sys.stdin.readline().strip()


def STR():
    return input()


def INT():
    return int(input())


def FLOAT():
    return float(input())


def MAP():
    return map(int, input().split())


def S_MAP():
    return map(str, input().split())


def LIST():
    return list(map(int, input().split()))


def S_LIST():
    return list(map(str, input().split()))


def lcm(a, b):
    return a * b // gcd(a, b)


sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
n, m = MAP()
s = STR()
ans = []
i = n
while i > 0:
    if s[i] == '0':
        prei = i
        for j in reversed(range(1, m + 1)):
            if i - j >= 0 and s[i - j] == '0':
                ans.append(str(j))
                i -= j
                break
        if i == prei:
            print(-1)
            exit()
ans.reverse()
print(' '.join(ans))

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd


def input():
    return sys.stdin.readline().strip()


def STR():
    return input()


def INT():
    return int(input())


def FLOAT():
    return float(input())


def MAP():
    return map(int, input().split())


def S_MAP():
    return map(str, input().split())


def LIST():
    return list(map(int, input().split()))


def S_LIST():
    return list(map(str, input().split()))


def lcm(a, b):
    return a * b // gcd(a, b)


sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
n, m = MAP()
s = STR()
ans = []
i = n
while i > 0:
    if s[i] == '0':
        prei = i
        for j in reversed(range(1, m + 1)):
            if i - j >= 0 and s[i - j] == '0':
                ans.append(str(j))
                i -= j
                break
        if i == prei:
            print(-1)
            exit()
ans.reverse()
print(' '.join(ans))
