In this problem, you will sort a list of lowercase character strings according to the following ordering rules. In the following, let str1 and str2 be two strings.
Your program should read from stdin, a series of lists. Each list starts with a number n of strings to be read, on a line by itself, followed by a single string per line. Your program should stop reading lists at the end-of-file.
Your program output should print the string "List #k:" (where k is the current list number) and then in the following lines, it should print the strings in ascending order, in left-aligned columns, with the width of each column being two characters long than the longest occurring string in that list. Lists should be separated by a single blank line. Each line is limited to 80 characters.
List #1
apparate fanfare
panacea albatross albacore
false
parmesan candelabra beans
vermeil
List #2
pastiche netherlands
zero
principia triumvirate
pomade commensurate plus
(end of ouput; prior empty line part of output)