#C457. Reconstruct Phone Number
Reconstruct Phone Number
Reconstruct Phone Number
You are given a scrambled phone number as a string which contains exactly one '-' character. Your task is to reconstruct the smallest valid phone number by removing the '-' and rearranging the remaining digits. The final phone number must be the smallest possible number (when compared as a string of digits in lexicographical order) with the condition that its first digit is not zero, i.e. it must satisfy \(d_1 \neq 0\) unless all digits are zero.
For example, given the input "3-1456", removing '-' gives "31456". By sorting the digits, we obtain "1,3,4,5,6" and then arrange them so that the first digit is nonzero. The correct answer is "13456".
If no nonzero digit exists after removal of '-', simply output the sorted result.
inputFormat
The input consists of a single line string representing the scrambled phone number which contains exactly one '-' character.
Input Format: A string read from standard input (stdin).
outputFormat
Output a single line string representing the smallest valid phone number obtained after processing the input.
Output Format: A string written to standard output (stdout).
## sample3-1456
13456