#K4256. Smallest Lexicographical Order String
Smallest Lexicographical Order String
Smallest Lexicographical Order String
You are given a set of strings consisting only of lowercase English letters. Your task is to transform each string into the lexicographically smallest possible string by reordering its characters. In other words, for each input string \(s\), you need to output the string obtained by sorting its characters in non-decreasing order.
For example, the string "example" becomes "aeelmpx" after sorting its characters in lexicographical order.
This problem tests your ability to manipulate strings and perform basic sorting operations.
inputFormat
The input consists of multiple lines:
- The first line contains an integer \(T\) (\(1 \le T \le 10^5\)) denoting the number of test cases.
- The following \(T\) lines each contain a string composed of lowercase letters only. Note that the string can be empty.
outputFormat
For each test case, output a single line containing the lexicographically smallest string that can be formed by sorting the characters of the input string.
## sample1
example
aeelmpx
</p>