Control C501B

Your task is to write a program that reads a sequence of words and prints them in alphabetical order.

Input

The input starts with a natural number nn and continues with the nn words that your program must sort. All the words are formed exclusively by lowercase letters.

Output

The output is a line with the nn words of the input in alphabetical order, separated by a comma.

Observation

You must use the algorithm selection sort to solve this problem. Any other method will be qualified with a zero.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T12:10:12.564Z

© Jutge.org, 2006–2026.
https://jutge.org