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

s = eval(input())

cnt = [0]*(n+1)

r = n

for i in range(n-1,-1,-1):

    if s[i] == '1':

        cnt[i] = -1

        continue

    while r > i+m:r -=1

    while cnt[r] == -1:r -= 1

    if i == r:

        print((-1))

        exit(0)

    cnt[i] =cnt[r]+1

now = 0

ans = []

for i in range(n+1):

    if cnt[i] == -1:continue

    if cnt[i] == cnt[now]-1:

        ans.append(i-now)

        now = i

print((*ans))

    

        

        

        

        

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

s = eval(input())

dp = [0]*(n+1)

r = n



for i in range(n-1,-1,-1):

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

        dp[i] = -1

        continue

    while r > i+m:r-=1

    while dp[r] == -1:r -= 1

    if r == i:

        print((-1))

        exit(0)

    dp[i] = dp[r]+1

now = 0

ans = []

for i in range(n+1):

    if dp[i] == -1:continue

    if dp[i] != dp[now]:

        ans.append(i-now)

        now = i

print((*ans))

        

    

    
n, m = list(map(int, input().split()))
s = eval(input())
cnt = [0] * (n + 1)
r = n
for i in range(n - 1, -1, -1):
    if s[i] == "1":
        cnt[i] = -1
        continue
    while r > i + m:
        r -= 1
    while cnt[r] == -1:
        r -= 1
    if i == r:
        print((-1))
        exit(0)
    cnt[i] = cnt[r] + 1
now = 0
ans = []
for i in range(n + 1):
    if cnt[i] == -1:
        continue
    if cnt[i] == cnt[now] - 1:
        ans.append(i - now)
        now = i
print((*ans))

n, m = list(map(int, input().split()))
s = eval(input())
dp = [0] * (n + 1)
r = n
for i in range(n - 1, -1, -1):
    if int(s[i]) == 1:
        dp[i] = -1
        continue
    while r > i + m:
        r -= 1
    while dp[r] == -1:
        r -= 1
    if r == i:
        print((-1))
        exit(0)
    dp[i] = dp[r] + 1
now = 0
ans = []
for i in range(n + 1):
    if dp[i] == -1:
        continue
    if dp[i] != dp[now]:
        ans.append(i - now)
        now = i
print((*ans))

-cnt = [0] * (n + 1) +dp = [0] * (n + 1) -    if s[i] == "1": -        cnt[i] = -1 +    if int(s[i]) == 1: +        dp[i] = -1 -    while cnt[r] == -1: +    while dp[r] == -1: -    if i == r: +    if r == i: -    cnt[i] = cnt[r] + 1 +    dp[i] = dp[r] + 1 -    if cnt[i] == -1: +    if dp[i] == -1: -    if cnt[i] == cnt[now] - 1: +    if dp[i] != dp[now]: