시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 65 8 6 13.333%

문제

어떤 0~9로만 이루어진 문자열이 있다.

당신은 이 문자열을 잘라서 증가 수열을 만드는데, 마지막 숫자를 최소화 하고 싶다.

만약 마지막 숫자가 같다면 맨 처음 숫자가 가장 큰 수열을 출력하고, 만약 첫 번째 숫자도 같다면 두 번째 숫자 ... 즉 앞에서부터 숫자가 큰 수열을 출력한다.

이 문제에서는 숫자가 0으로 시작할 수 있다.

입력

0~9로만 이루어진 문자열이 주어진다. 문자열의 길이는 80을 넘지 않는다.

출력

문자열을 “,”로 끊어서 출력한다.

예제 입력 1

3456

예제 출력 1

3,4,5,6
W3sicHJvYmxlbV9pZCI6IjEzMjkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM5OWRcdWFjMDAgXHVjMjE4XHVjNWY0IiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1YjRcdWI1YTQgMH45XHViODVjXHViOWNjIFx1Yzc3NFx1YjhlOFx1YzViNFx1YzljNCBcdWJiMzhcdWM3OTBcdWM1ZjRcdWM3NzQgXHVjNzg4XHViMmU0LjxcL3A+XHJcblxyXG48cD5cdWIyZjlcdWMyZTBcdWM3NDAgXHVjNzc0IFx1YmIzOFx1Yzc5MFx1YzVmNFx1Yzc0NCBcdWM3OThcdWI3N2NcdWMxMWMgXHVjOTlkXHVhYzAwIFx1YzIxOFx1YzVmNFx1Yzc0NCBcdWI5Y2NcdWI0ZGNcdWIyOTRcdWIzNzAsIFx1YjljOFx1YzljMFx1YjljOSBcdWMyMmJcdWM3OTBcdWI5N2MgXHVjZDVjXHVjMThjXHVkNjU0IFx1ZDU1OFx1YWNlMCBcdWMyZjZcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1YjljY1x1YzU3ZCBcdWI5YzhcdWM5YzBcdWI5YzkgXHVjMjJiXHVjNzkwXHVhYzAwIFx1YWMxOVx1YjJlNFx1YmE3NCBcdWI5ZTggXHVjY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