There are multiple test cases. The first line of input contains an integer T, indicating the number of test cases.
For each test case, the first line contains an integer n () -- the number of vertices in the tree. The second line contains n-1 integers
(
), where
means there is an edge between vertex i and vertex
.
It's guaranteed that the sum of n of all test cases will not exceed.
For each test case, output an integer denoting the value of