#C168. Sort Strings Alphabetically
Sort Strings Alphabetically
Sort Strings Alphabetically
You are given a list of strings. Your task is to sort them in lexicographical (alphabetical) order and output the sorted list.
Note that the comparison is case-sensitive, i.e. uppercase letters come before lowercase letters in the standard ASCII order.
The input begins with an integer \(n\) indicating the number of strings, followed by \(n\) lines each containing a string. The output should be a single line of the sorted strings separated by a single space.
For example, given the input:
3 banana apple cherry
The correct output is:
apple banana cherry
inputFormat
The first line of input contains an integer \(n\) (\(0 \leq n \leq 10^5\)), representing the number of strings. The following \(n\) lines each contain a non-empty string consisting of English letters (both uppercase and lowercase) and symbols. There are no spaces within a string.
outputFormat
Output a single line containing the sorted strings in lexicographical order, separated by a single space. If \(n = 0\), output an empty line.
## sample3
banana
apple
cherry
apple banana cherry