Jiwj123 @ 2021-05-31 17:00:19
str_num = input()
length = len(str_num)
for i in range(length-1):
str_num2 = input()
str_num += str_num2
str_num += " "
cnt = 1
length = len(str_num)
print(int(length**0.5), end=" ")
if str_num[0] != '0':
print(0, end=" ")
for i in range(1, length):
if str_num[i] == str_num[i-1]:
cnt += 1
else:
print(cnt, end=" ")
cnt = 1