Using roman numerals the numbers I
, II
,
III
, IV
, V
, VI
, VII
, VIII
, IX
. Numbers X
, XX
, XXX
, XL
, L
, LX
, LXX
, LXXX
, XC
.
Any number smaller than XLVIII
, XL
for VIII
for
Given a number written in roman numerals, rearrange its characters so that you create the smallest possible number, written in roman numerals.
Input
The first and only line of input contains one integer
Output
The first and only line of output should contain a rearrangement of input characters so that it represents the smallest possible number, written in roman numerals.
Sample Input 1
Copy
VII
Sample Output 1
Copy
VII
Sample Input 2
Copy
VI
Sample Output 2
Copy
IV
Sample Input 3
Copy
III
Sample Output 3
Copy
III
Comments