n,m = list(map(int,input().split()))

s = eval(input())



s_0 = []

for i in range(n+1):

    if(s[i] == '0'):

        s_0.append(i)



# 二分木

import bisect



now = n

ans_rev = []

while(now != 0):

    next_i = bisect.bisect_left(s_0, now-m)

    next = s_0[next_i]

    if(now == next):

        print((-1))

        exit()

    ans_rev.append(now-next)

    now = next



print((' '.join(map(str, ans_rev[::-1]))))
n,m = list(map(int,input().split()))

s = eval(input())



now = n

ans_rev = []

while(now != 0):

    for i in range( max(0,now-m),now+1):

        if(i == now):

            print((-1))

            exit()

        if(s[i] == '1'):

            continue



        ans_rev.append(now - i)

        now = i

        break



print((' '.join(map(str, ans_rev[::-1]))))
n, m = list(map(int, input().split()))
s = eval(input())
s_0 = []
for i in range(n + 1):
    if s[i] == "0":
        s_0.append(i)
# 二分木
import bisect

now = n
ans_rev = []
while now != 0:
    next_i = bisect.bisect_left(s_0, now - m)
    next = s_0[next_i]
    if now == next:
        print((-1))
        exit()
    ans_rev.append(now - next)
    now = next
print((" ".join(map(str, ans_rev[::-1]))))

n, m = list(map(int, input().split()))
s = eval(input())
now = n
ans_rev = []
while now != 0:
    for i in range(max(0, now - m), now + 1):
        if i == now:
            print((-1))
            exit()
        if s[i] == "1":
            continue
        ans_rev.append(now - i)
        now = i
        break
print((" ".join(map(str, ans_rev[::-1]))))

-s_0 = [] -for i in range(n + 1): -    if s[i] == "0": -        s_0.append(i) -# 二分木 -import bisect - -    next_i = bisect.bisect_left(s_0, now - m) -    next = s_0[next_i] -    if now == next: -        print((-1)) -        exit() -    ans_rev.append(now - next) -    now = next +    for i in range(max(0, now - m), now + 1): +        if i == now: +            print((-1)) +            exit() +        if s[i] == "1": +            continue +        ans_rev.append(now - i) +        now = i +        break