The first line of the input contains one integer $T$ $(1 \leq T \leq 10)$, indicating the number of test cases.
Then $T$ test cases follow.
The first line of each test case contains a single integer $n$ $(1\leq n\leq 10^5)$ - the number of energy points.
The second line contains $n$ integers $b_1,b_2,\ldots,b_n$ $(1\leq b_i\leq 100)$ - the energy value before changing. The third line contains $n$ integers $a_1,a_2,\ldots,a_n$ $(1\leq a_i\leq 100)$ - the energy value after changing.
Each of the next $n-1$ lines contains two integers $x,y$ $(1\leq x,y\leq n)$, indicating the two energy point connected by the branch.