LearnPy Hub
← Arena
AdvancedRating 1500

Partition the String

Split the string into as many parts as possible so that each letter appears in at most one part. Print the part sizes.

Input

One string.

Output

One line.

Sample 1

Input
ababcbacadefegdehijhklij
Output
9 7 8

Sample 2

Input
eccbbbbdec
Output
10
solution.py
Output appears here
Partition the String · Python Arena problem · LearnPy Hub