There is a track system consisting of $$$n$$$ intersections, numbered from $$$1$$$ to $$$n$$$. The track forms a tree rooted at intersection $$$1$$$. An unstoppable trolley starts at intersection $$$1$$$ and moves along the edges of the tree.
Each edge, corresponding to a track segment, contains one of the following:
You are a robot, and all robots share a unified mind. You can control the direction of the trolley at any intersection it arrives at.
The trolley stops when there are no further directions it can take. Determine the intersection at which the trolley will stop.
If there are multiple possible answers, you may output any.
Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the number of intersections.
The second line of each test case contains $$$n - 1$$$ integers $$$p_2, p_3, \ldots, p_n$$$ ($$$1 \le p_i \lt i$$$), where $$$p_i$$$ denotes the parent of intersection $$$i$$$ in the tree.
The third line of each test case contains $$$n - 1$$$ integers $$$a_2, a_3, \ldots, a_n$$$ ($$$0 \le a_i \le 2$$$), where $$$a_i$$$ describes the type of the track segment between node $$$p_i$$$ and node $$$i$$$:
The sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, output a single integer denoting a possible answer. If there are multiple possible answers, you may output any.
341 2 30 1 251 1 2 30 1 2 251 1 2 20 1 2 1
444