While sorting through old books in the attic, a schoolboy named Vasya discovered an English-Latin dictionary. Vasya already knew English perfectly and wanted to learn Latin, so finding this dictionary was very helpful for him.
However, to truly master a language, just one dictionary is not enough: in addition to an English-Latin dictionary, a Latin-English dictionary is also required. Since he did not have such a dictionary, Vasya decided to create a Latin-English dictionary from the English-Latin one.
A dictionary consists of source words, each followed by several translations. For each Latin word that appears anywhere in the dictionary, Vasya wants to find all its translations (that is, all English words for which this Latin word occurs 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.
The first line contains a single integer — the number of English words in the dictionary. Then descriptions follow. Each description starts with a line containing an English word. The next line contains a single integer K \geq 1 — the number of translations. The following lines contain the translations of the current English word into Latin, one per line.
Each description is also provided on a separate line, where first the English word is written, then a dash (character number ) surrounded by spaces, then the translations of this English word into Latin, separated by commas and spaces. The translations are sorted in lexicographical order. The sequence of English words in the dictionary is also lexicographical.
All words consist only of lowercase Latin letters, and each word does not exceed characters. The total number of words in the input does not exceed .
Output the corresponding Latin-English dictionary, maintaining the exact input data format. Specifically, the translation of the lexicographically smallest Latin word must appear first, then the second in this order, and so on. Within each translation, the English words must also be sorted lexicographically.
Example 1