from itertools import groupby
astring = input()
l = []
for i, k in groupby(astring):
    l.append((len(list(k)), int(i)))
print(*l, sep=' ')

7c417559946f05e8921ab8f06bad7e638a02581e
<mask token>

<mask token>
for i, k in groupby(astring):
    l.append((len(list(k)), int(i)))
print(*l, sep=' ')

<mask token>
astring = input()
l = []
for i, k in groupby(astring):
    l.append((len(list(k)), int(i)))
print(*l, sep=' ')

from itertools import groupby
astring = input()
l = []
for i, k in groupby(astring):
    l.append((len(list(k)), int(i)))
print(*l, sep=' ')
