Serval is a new student in Japari Kindergarten.
There is an English course in the kindergarten. The teacher sets some writing tasks for students to improve their writing skills. Therefore, Serval has to complete an essay, in English.
You might know that in an essay, the author has to convince readers of several 
arguments by showing them evidence.
Serval have collected 
nnn available arguments numbered from 
111 to 
nnn that can be written in his essay. For the 
iii-th argument, Serval can conclude that 
iii-th argument is true when the arguments numbered 
ai,1,ai,2,…,ai,kia_{i,1}, a_{i,2}, \dots, a_{i,k_i}ai,1,ai,2,…,ai,ki are all true. Specially, the 
iii-th argument cannot be proven true by making conclusion when 
ki=0k_i = 0ki=0. It is guaranteed that 
ai,j≠ia_{i,j}\neq iai,j=i for all 
iii (
1≤i≤n1\leq i\leq n1≤i≤n), and 
ai,j≠ai,ka_{i,j}\neq a_{i,k}ai,j=ai,k when 
j≠kj\neq kj=k.
At the beginning of his essay, Serval will set exactly one argument from all the arguments as the 
argument basis, which is regarded as true. Starting with the argument basis, Serval will claim that some other arguments are true by making conclusions to complete his essay. It can be shown that for the 
iii-th argument with 
ki=0k_i = 0ki=0, it can be true if and only if it is the argument basis.
Serval wants to maximize the number of true arguments in the essay, so he needs to set the argument basis optimally. However, as a kindergarten student, he cannot even find out the number of true arguments he can obtain.
		
			Could you help him find out the answer?