Score : $200$ points
You are given a string $S$. Find the lexicographically smallest string $S'$ obtained by permuting the characters of $S$.
Here, for different two strings $s = s_1 s_2 \ldots s_n$ and $t = t_1 t_2 \ldots t_m$, $s \lt t$ holds lexicographically when one of the conditions below is satisfied.
Input is given from Standard Input in the following format:
$S$
Print the lexicographically smallest string $S'$ obtained by permuting the characters in $S$.
aba
aab
Three strings can be obtained by permuting aba
:
aba
aab
baa
The lexicographically smallest among them is aab
.
zzzz
zzzz