from bisect import bisect_right



N, M = list(map(int, input().split()))

S = [N - i for i, s in enumerate(eval(input())) if s == '0']

S = S[::-1]



ans = []

now = 0

while now < N:

    i = bisect_right(S, now + M) - 1



    if S[i] == now:

        print('-1')

        exit()



    ans.append(S[i] - now)

    now = S[i]



print((*ans[::-1]))

from bisect import bisect_left



N, M = list(map(int, input().split()))

S = [i for i, s in enumerate(eval(input())) if s == '0']



ans = []

now = N

while now > 0:

    nxI = bisect_left(S, now - M)

    nx = S[nxI]



    if nx == now:

        print((-1))

        exit()



    ans.append(now - nx)

    now = nx



print((*ans[::-1]))

from bisect import bisect_right

N, M = list(map(int, input().split()))
S = [N - i for i, s in enumerate(eval(input())) if s == "0"]
S = S[::-1]
ans = []
now = 0
while now < N:
    i = bisect_right(S, now + M) - 1
    if S[i] == now:
        print("-1")
        exit()
    ans.append(S[i] - now)
    now = S[i]
print((*ans[::-1]))

from bisect import bisect_left

N, M = list(map(int, input().split()))
S = [i for i, s in enumerate(eval(input())) if s == "0"]
ans = []
now = N
while now > 0:
    nxI = bisect_left(S, now - M)
    nx = S[nxI]
    if nx == now:
        print((-1))
        exit()
    ans.append(now - nx)
    now = nx
print((*ans[::-1]))

-from bisect import bisect_right +from bisect import bisect_left -S = [N - i for i, s in enumerate(eval(input())) if s == "0"] -S = S[::-1] +S = [i for i, s in enumerate(eval(input())) if s == "0"] -now = 0 -while now < N: -    i = bisect_right(S, now + M) - 1 -    if S[i] == now: -        print("-1") +now = N +while now > 0: +    nxI = bisect_left(S, now - M) +    nx = S[nxI] +    if nx == now: +        print((-1)) -    ans.append(S[i] - now) -    now = S[i] +    ans.append(now - nx) +    now = nx