As you may remember, Marge Simpson once became a spectacle during a parent teachers association meeting for not having an e-mail address. After that meeting, she decided to take a chance on using the Internet. Soon, Marge got bitten by the information highway bug. As soon as Bart, Lisa, Maggie and Homer were all asleep, Marge would get out of bed, sneak down the stairs, sit on the couch, open her laptop and enter the Internet.
Recently, Marge got interested in her family tree. Using her favourite word processor Notepad, Marge collected part of her family tree (the second and third line of the sample input provided below are part of her file). However, this file does not give her an appealing view of her family tree. Can you help Marge?
To simplify matters, you may assume that first names are unique. Furthermore, you may also assume that nobody remarries and only couples have children.
The input consists of multiple instances (more than one, less than 1000). Each instance starts with an integer n (1 <= n <= 100). A zero signals the end of the input. The line containing the integer n is followed by n lines. Each line describes a family and has the following format
c p1 p2 c1 c2 ... cnwhere c (0 <= c <= 10) is the number of children of the family, p1 and p2 are the names of the parents (each name consisting of 2 to 10 characters) and c1, c2, ..., cn are the names of the n children (each name consisting of 2 to 10 characters). The children are sorted by age, the oldest first.
2 3 Homer Marge Bart Lisa Maggie 2 Abraham Mona Herb Homer 5 2 Taryll Breanna Bryce Adren 3 Michael Debbie Prince Paris Blanket 2 Toriano Deloris Tariano Taryll 10 Katherine Joseph Maureen Sigmund Toriano Jermaine LaToya Marlon Brandon Michael Steven Janet 2 Steven Alejandra Genevieve Randy 0
*Abraham Mona *Herb *Homer Marge *Bart *Lisa *Maggie *Katherine Joseph *Maureen *Sigmund *Toriano Deloris *Tariano *Taryll Breanna *Bryce *Adren *Jermaine *LaToya *Marlon *Brandon *Michael Debbie *Prince *Paris *Blanket *Steven Alejandra *Genevieve *Randy *Janet