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

*s,=list(map(int,input()[::-1]))

a=[]

i=0

while i<n:

  j=max(j for j in range(i,min(n,i+m)+1)if not s[j])

  if i==j:

    print((-1))

    exit()

  a+=j-i,

  i=j

print((*a[::-1]))
n,m=list(map(int,input().split()))

*s,=list(map(int,input()[::-1]))

i=0

a=[]

while i<n:

    j=min(n,i+m)

    while s[j]:j-=1

    if j==i:

        print((-1))

        exit()

    a+=j-i,

    i=j

print((*a[::-1]))
n, m = list(map(int, input().split()))
(*s,) = list(map(int, input()[::-1]))
a = []
i = 0
while i < n:
    j = max(j for j in range(i, min(n, i + m) + 1) if not s[j])
    if i == j:
        print((-1))
        exit()
    a += (j - i,)
    i = j
print((*a[::-1]))

n, m = list(map(int, input().split()))
(*s,) = list(map(int, input()[::-1]))
i = 0
a = []
while i < n:
    j = min(n, i + m)
    while s[j]:
        j -= 1
    if j == i:
        print((-1))
        exit()
    a += (j - i,)
    i = j
print((*a[::-1]))

+i = 0 -i = 0 -    j = max(j for j in range(i, min(n, i + m) + 1) if not s[j]) -    if i == j: +    j = min(n, i + m) +    while s[j]: +        j -= 1 +    if j == i: