#C4064. Lexicographically Smallest String

    ID: 47561 Type: Default 1000ms 256MiB

Lexicographically Smallest String

Lexicographically Smallest String

You are given a string S consisting only of lowercase English letters. Your task is to rearrange the characters of the string to form the lexicographically smallest possible string. In other words, you should sort the characters in non-decreasing order.

For example, given the string \(s = \texttt{bca}\), the lexicographically smallest string is \(\texttt{abc}\). Similarly, for \(s = \texttt{acdb}\) the answer is \(\texttt{abcd}\).

You will be given multiple test cases. For each test case, output the lexicographically smallest string obtained by sorting the characters of the input string.

inputFormat

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

T
s1
s2
...
sT

Here, T is an integer representing the number of test cases, and each si is a string consisting of lowercase English letters. Note that a test case may be an empty string.

outputFormat

For each test case, output a single line containing the lexicographically smallest string formed by sorting the characters of the input string. The output should be written to standard output (stdout).

## sample
3
bca
acdb
a
abc

abcd a

</p>