In the first line, there is an integer $T(T\leq100)$ indicating the number of test cases.
For each test case,the first line contains one integers n(1\leq n\leq 50), indicating the number of vertice.
In the next n-1 lines, Each line contains two integers $u$ and $v$ meaning that vertice $u$ is the father of vertice $v$.
In the next line contains $n$ integers $A_1,A_2,\ldots,A_n(0\leq A_x\leq n)$.
In the next line contains $n$ integers $C_1,C_2,\ldots,C_n$, indicating the color of each vertice($C_x=0$ means the color of vertice $x$ is white, $C_x=1$ means the color of vertice $x$ is black)