#K70842. Lexicographically Smallest String
Lexicographically Smallest String
Lexicographically Smallest String
Given a list of strings, your task is to transform each string into its lexicographically smallest form by sorting the characters in ascending order. In other words, for a given string ( s ), you should output ( sorted(s) ), where the sorting is done in ascending order based on the ASCII values of the characters. Note that uppercase letters will come before lowercase letters due to their ASCII values.
inputFormat
The first line contains a single integer ( n ), denoting the number of strings. This is followed by ( n ) lines, each containing one string. The strings may be empty.
outputFormat
Output ( n ) lines, each line containing the lexicographically smallest form of the corresponding input string.## sample
1
cba
abc
</p>