#C6987. Alphanumeric Reordering

    ID: 50807 Type: Default 1000ms 256MiB

Alphanumeric Reordering

Alphanumeric Reordering

You are given a string S consisting of lowercase alphabets and digits. Your task is to rearrange the string such that all the alphabets appear first in ascending order, followed by all the digits in descending order.

In other words, let \(A = \{ a \in S \mid a \text{ is an alphabet} \}\) and \(D = \{ d \in S \mid d \text{ is a digit} \}\), then the output should be:

\[ \text{result} = \text{sorted}(A) \Vert \text{sorted}_{\text{desc}}(D) \]

It is guaranteed that the string contains only lowercase alphabets and digits. If the string is empty, output an empty string.

inputFormat

The input consists of a single line containing the string S.

outputFormat

Output the rearranged string according to the problem statement.

## sample
a1c3b2
abc321