It is guaranteed that the sum of N over all test cases does not exceed 1000,n的总和不超过1000
输入的v和p表示 v是p的儿子