was given a problem from his computer science teacher. The problem is as follows:
Write a program that will sort a grocery list, entered by the user, into alphabetical order.
Input Specification
The first line of input will be a positive integer , denoting the number of items on the list.
The next lines will contain single-word strings, each containing only letters of the alphabet that are lower case.
The string length, , will have the constraints of .
Output Specification
Output lines, each line containing an item in the grocery list, sorted.
Sample Input
5
apples
parmesan
driedfigs
babycarrots
pitabread
Sample Output
apples
babycarrots
driedfigs
parmesan
pitabread
Comments
There is an extra whitespace in the sample output for line 2 "baby carrots" instead of "babycarrots."
Fixed, sorry about the mistake.