There is a list of English words. Output them in lexicographic order. We compare the first character of two strings S1 and S2. If the ASCII code of the first character of S1 is smaller than the first character of S2, we said that S1 is smaller than S2. Otherwise, if their first characters are the same, we compare their second characters, so on so forth until we can determine their order. If S1 is S2’s prefix, S1 is smaller than S2 and vice versa.
There are multiple test cases. Each case begins with an integer N in a line, and then N words follow, each word in a line. The maximum length of words is 50. The alphabets are 26 small English letters ‘a’ to ‘z’. The input is terminated if N = 0.
Case 1: 1 <= N <= 10
Case 2: 1 <= N <= 100
Case 3: 1 <= N <= 500
Case 4: 1 <= N <= 1000
For each test case, print the words in lexicographic order, one word per line.
Print a blank line after each case.