The integers from 1 to 9 are written in Roman numerals as I, II, III, IV, V, VI, VII, VIII, and IX.
The multiples of 10 from 10 to 90 are written as X, XX, XXX, XL, L, LX, LXX, LXXX, and XC.
To write a positive integer less than 100 as a Roman numeral, write the tens digit and the ones digit separately using the rules above, then concatenate the two parts.
You are given a Roman numeral B. Rearrange all characters of B, using each character exactly once. Among all valid Roman numerals that can be made this way, output the one with the smallest value.
The first line contains B, the Roman numeral representation of an integer at least 1 and less than 100.
Output the valid Roman numeral with the smallest value that can be made by rearranging the characters of B.