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

S = eval(input())



ans = []

i = N

while i > 0:

    prev = i

    for j in range(max(0, i-M), i):

        if S[j] == "0":

            ans.append(str(i-j))

            i = j

            break

    if i == prev:

        ans = -1

        break



if ans == -1:

    print(ans)

else:

    ans.reverse()

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

S = list(eval(input()))



S.reverse()

ans = []

i = 0

while i < N:

    num = 0

    for j in range(min(N, i+M), i, -1):

        if S[j] == "0":

            num = j-i

            i = j

            break

    if num == 0:

        ans = -1

        break

    ans.append(num)



if ans == -1:

    print(ans)

else:

    ans.reverse()

    print((*ans))
N, M = list(map(int, input().split()))
S = eval(input())
ans = []
i = N
while i > 0:
    prev = i
    for j in range(max(0, i - M), i):
        if S[j] == "0":
            ans.append(str(i - j))
            i = j
            break
    if i == prev:
        ans = -1
        break
if ans == -1:
    print(ans)
else:
    ans.reverse()
    print((*ans))

N, M = list(map(int, input().split()))
S = list(eval(input()))
S.reverse()
ans = []
i = 0
while i < N:
    num = 0
    for j in range(min(N, i + M), i, -1):
        if S[j] == "0":
            num = j - i
            i = j
            break
    if num == 0:
        ans = -1
        break
    ans.append(num)
if ans == -1:
    print(ans)
else:
    ans.reverse()
    print((*ans))

-S = eval(input()) +S = list(eval(input())) +S.reverse() -i = N -while i > 0: -    prev = i -    for j in range(max(0, i - M), i): +i = 0 +while i < N: +    num = 0 +    for j in range(min(N, i + M), i, -1): -            ans.append(str(i - j)) +            num = j - i -    if i == prev: +    if num == 0: +    ans.append(num)