#K45647. Decode the Encoded Messages

    ID: 27800 Type: Default 1000ms 256MiB

Decode the Encoded Messages

Decode the Encoded Messages

You are given T encoded messages. Each encoded message is an integer. The task is to decode each message by rearranging its digits in descending order.

For an integer n with digit sequence \(d_1d_2\dots d_k\), the decoded number is obtained by ordering the digits in descending order: \[ \text{decoded}(n) = \text{sort}(d_1, d_2, \dots, d_k)\text{ (in descending order)} \]

For example, decoding 2143 results in 4321.

inputFormat

The input is read from standard input (stdin) and has the following format:

  • The first line contains an integer T, the number of encoded messages.
  • The second line contains T positive integers separated by spaces, each representing an encoded message.

outputFormat

Print the decoded messages to standard output (stdout) in one line, separated by a single space. Each decoded message is the integer obtained by rearranging the digits of the corresponding encoded message in descending order.

## sample
1
5
5