The system of Martians' blood relations is quite confusing. Martians reproduce when and how they wish, gathering in different groups, so that a Martian can have one parent or several, and no one is surprised if someone has a hundred children. Martians have adapted to this, and it seems natural to them. However, in the Planetary Council, this confusing genealogical system leads to significant difficulties. The Council is attended by the worthiest Martians, and in order to avoid offending anyone, all discussions are conducted so that first, representatives of older generations speak, then the younger ones, and finally the youngest and childless Martians. Maintaining this order is not an easy task. Not every Martian knows all their parents, let alone their grandparents! If, by mistake, a descendant speaks first and only then his young-looking great-grandfather, it's a real scandal. Your goal is to write a program that determines an order of speaking in the Planetary Council that guarantees that every member speaks before any of their descendants.
The first line of input contains a single number , 1 \leq N \leq 100 — the number of members of the Martian Planetary Council. According to tradition, Council members are numbered with integers from to . Then, there are exactly lines; the -th line contains the list of the -th member's children. The list of children is a sequence of numbers (child indices), separated by spaces and listed in any order. The list may be empty. The list (even if it is empty) ends with .
The output should contain a sequence of speaker numbers, separated by spaces. If there are multiple sequences that satisfy the problem conditions, output any one of them. There is always at least one such sequence.
Example 1