The first line of the input contains a single number $N$ that represents the number of clerks, $1 ≤ N ≤ 1000$. The clerks are assigned unique ID numbers from the range between $1$ and $N$. The ID number of the treasurer (Skinflint) is $1$. Each of the following $N$ lines corresponds to one of the clerks: it contains his/her ID number, the number $K$ of his/her subordinates, $0 ≤ K ≤ 999$, and the ID numbers of his/her $K$ subordinates separated by single spaces. You can assume that the line corresponding to a clerk never appears before the line corresponding to his/her supervisor.