MP3 Songs

No attempts yetTime limit1sMemory limit128 MB

Problem

Sue loves her MP3 player, but she hates that shuffle mode plays her tracks in random order. Because she loves order and patterns, she wants the tunes on her MP3 player to be played in alphabetical order of tune name. In this problem you must help Sue by sorting her tunes into alphabetical order of tune name.

Input

The input consists of several scenarios. Each scenario begins with a single positive integer nn, the number of music tracks to sort (1<n2001 < n \le 200). The last line of the input is a single 00; this scenario is not processed.

Each scenario consists of nn lines, each containing one tune name. No line contains more than 250 characters. Every name begins with an alphabetic character.

Output

For each scenario, first print the scenario number on a line of its own, starting from 1. Then print the tune names from the input, sorted into alphabetical order, one name per line, for a total of nn lines. Case is ignored when sorting. If two names are equal when case is ignored, keep their original input order.