#K33892. Minimal Good String

    ID: 25188 Type: Default 1000ms 256MiB

Minimal Good String

Minimal Good String

This problem requires you to find the lexicographically smallest "good" string that can be obtained by reordering the characters of a given string s. A "good" string is defined as the string with its characters arranged in non-decreasing order. Essentially, you need to sort the characters of the string.

You will be given multiple test cases. For each test case, output the minimal good string. The lexicographical order is defined based on the ASCII values of the characters.

inputFormat

The first line of input contains an integer T representing the number of test cases. Each of the following T lines contains a non-empty string s.

outputFormat

For each test case, output the lexicographically smallest string obtained by reordering the characters of s. Each result should be printed on a new line.## sample

3
cba
abc
bca
abc

abc abc

</p>