#K94812. Rearrange String Characters
Rearrange String Characters
Rearrange String Characters
You are given a string that consists of alphabetical letters and digits. Your task is to rearrange the string such that all the letters appear first in sorted order, followed by all the digits in sorted order.
In other words, if the input string is \( s \), you must produce a string \( t \) where all the letters from \( s \) are sorted (according to their ASCII values) and placed before all the digits from \( s \) which are also sorted. For example, if \( s = \texttt{b2a1c3} \), then the output should be \( \texttt{abc123} \).
Note: Sorting is performed using the standard lexicographical order. That is, all uppercase letters come before lowercase letters since their ASCII values are lower.
You need to implement a solution that reads the input from standard input (stdin) and writes the output to standard output (stdout).
inputFormat
The input consists of a single line containing a string \( s \) composed of letters and digits. The string may be empty.
outputFormat
Output a single line containing the rearranged string. The letters in the string should appear in sorted order, followed by the digits in sorted order.
## sampleb2a1c3
abc123