Time limit
2s
Memory limit
128 MB
You are given a string consisting only of digits from 0 through 9.
Split the string into one or more contiguous pieces so that, when each piece is read as a decimal integer, the values form a strictly increasing sequence. A piece may begin with 0; those leading zeroes do not affect value comparisons, but each piece must be printed exactly as it appears in the input.
Among all valid splits, minimize the value of the last number.
If several splits have the same last value, choose the sequence whose first number has the largest value. If those are also equal, compare the second number, then the third, and so on; choose the sequence with the larger value at the first position where they differ.
A string consisting only of digits from 0 through 9 is given on one line. Its length is at most 80.
Print the chosen pieces on one line, separated by commas (,).