#K74202. Lexicographically Smallest String
Lexicographically Smallest String
Lexicographically Smallest String
You are given an integer T representing the number of test cases. Each test case consists of a single string. For every test case, your task is to output the lexicographically smallest string that can be obtained by sorting the characters of the given string in non-decreasing order.
In other words, for a string \( s \), you need to output \( s' \) such that \( s' = \text{sorted}(s) \). For example, if \( s = "cba" \), then the answer is \( "abc" \).
Input-Output Example:
Input: 3 cba acbd zxy</p>Output: abc abcd xyz
Make sure to read the input from stdin and print the output to stdout.
inputFormat
The first line contains an integer T, the number of test cases. The following T lines each contain a single string that needs to be processed.
Constraints:
- 1 \( \leq T \leq 10^5 \)
- Each string consists of lowercase English letters only.
outputFormat
For each test case, output the lexicographically smallest string obtained by sorting the characters of the input string. Each answer should be printed on a new line.
## sample3
cba
acbd
zxy
abc
abcd
xyz
</p>