from bisect import bisect_right



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

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

S = S[:: -1]



ans = []

now = 0

while S[now] != 0:

    to = bisect_right(S, S[now] + M) - 1



    if to == now:

        print('-1')

        exit()

    ans.append(S[to] - S[now])

    now = to



ans = ans[:: -1]

print((*ans))
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_right

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

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]))

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