#C3734. Rearrange String Letters and Digits
Rearrange String Letters and Digits
Rearrange String Letters and Digits
Given a string that contains both letters and digits, rearrange it such that all letters appear first in alphabetical order, followed by all digits in ascending order.
For example, if the input string is "a3b7c2d1", the output should be "abcd1237".
Your solution should read from standard input (stdin) and write the result to standard output (stdout).
inputFormat
The input consists of a single line containing the string s
composed of alphanumeric characters. The string may contain both lowercase/uppercase letters and digits without any spaces.
outputFormat
Output a single line containing the rearranged string, where all letters are sorted in alphabetical order and appear first, followed by all digits sorted in ascending order.
## samplea3b7c2d1
abcd1237