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

S = eval(input())



pos = N

step = []

isGoal = 1

while pos > 0:

    for i in range(M, 0, -1):

        if pos - i <= 0:

            step.append(pos)

            pos = 0

        elif S[pos - i] == '0':

            step.append(i)

            pos -= i

        else:

            continue

        break

    else:

        isGoal = 0

        break



if isGoal:

    print((*[x for x in reversed(step)]))

else:

    print((-1))

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

S = list(reversed(eval(input())))



ans = []

cur = 0

while cur < N:

    for m in range(M, 0, -1):

        ncur = cur + m

        if ncur <= N and S[ncur] == '0':

            ans.append(m)

            cur = ncur

            break

    else:

        print((-1))

        exit()



print((*reversed(ans)))

N, M = list(map(int, input().split()))
S = eval(input())
pos = N
step = []
isGoal = 1
while pos > 0:
    for i in range(M, 0, -1):
        if pos - i <= 0:
            step.append(pos)
            pos = 0
        elif S[pos - i] == "0":
            step.append(i)
            pos -= i
        else:
            continue
        break
    else:
        isGoal = 0
        break
if isGoal:
    print((*[x for x in reversed(step)]))
else:
    print((-1))

N, M = list(map(int, input().split()))
S = list(reversed(eval(input())))
ans = []
cur = 0
while cur < N:
    for m in range(M, 0, -1):
        ncur = cur + m
        if ncur <= N and S[ncur] == "0":
            ans.append(m)
            cur = ncur
            break
    else:
        print((-1))
        exit()
print((*reversed(ans)))

-S = eval(input()) -pos = N -step = [] -isGoal = 1 -while pos > 0: -    for i in range(M, 0, -1): -        if pos - i <= 0: -            step.append(pos) -            pos = 0 -        elif S[pos - i] == "0": -            step.append(i) -            pos -= i -        else: -            continue -        break +S = list(reversed(eval(input()))) +ans = [] +cur = 0 +while cur < N: +    for m in range(M, 0, -1): +        ncur = cur + m +        if ncur <= N and S[ncur] == "0": +            ans.append(m) +            cur = ncur +            break -        isGoal = 0 -        break -if isGoal: -    print((*[x for x in reversed(step)])) -else: -    print((-1)) +        print((-1)) +        exit() +print((*reversed(ans)))