시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 52 6 5 11.364%

문제

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

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

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

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

입력

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

출력

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

예제 입력 1

3456

예제 출력 1

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