Dictionary
While sorting through old books in the attic, a schoolboy named Vasya discovered an English-Latin dictionary. Vasya, who already had a perfect command of English, dreamed of learning Latin. Thus, finding this dictionary was a stroke of luck for him.
However, to truly master a language, one dictionary isn't sufficient. In addition to the English-Latin dictionary, Vasya needed a Latin-English dictionary. Since he didn't have one, he decided to create it himself using the dictionary he found.
A dictionary typically consists of words to be translated, each followed by several translation words. For each Latin word that appears anywhere in the dictionary, Vasya wants to identify all its translations (i.e., all English words for which this Latin word appears in their list of translations) and use only these as translations for the Latin word.
Help Vasya create a Latin-English dictionary from the English-Latin one.
Input
The first line contains a single integer N - the number of English words in the dictionary. This is followed by N descriptions. Each description starts with a line containing an English word. The next line contains a single integer K ≥ 1 - the number of translations. The following K lines list the translations of the current English word into Latin, one per line.
Each description is formatted with the English word first, followed by a space-separated dash (character number 45), and then the translations of this English word into Latin, separated by commas with spaces. The translations are sorted in lexicographical order. The English words in the dictionary are also sorted lexicographically.
All words consist only of lowercase Latin letters, and each word is no longer than 15 characters. The total number of words in the input does not exceed 100000.
Output
Output the corresponding Latin-English dictionary, maintaining the input data format. Specifically, the translation of the lexicographically smallest Latin word should appear first, followed by the next in this order, and so on. Within each translation, the English words should also be sorted lexicographically.