str = gets.split
N,M = str[0].to_i, str[1].to_i
S = gets.chomp
a = []
b = N
c = 1
while b > M
    d = M
    while S[-c-d] == "1"
        d -= 1
    end
    if d == 0
        puts "-1"
        exit
    end
    a.push(d)
    b -= d
    c += d
end
a.push(b)
for i in 1..a.size do
    print a.pop
    print " "
end
puts