First line contains an integer $T$, which indicates the number of test cases.
Every test case begins with an integers $N$, which is the length of array $A$, $B$ and $C$.
The $2^{nd}$ line and $3^{rd}$ line describe the array $A$. The $2^{nd}$ line contains $N$ intergers $A_1$, $A_2$, $\cdots$, $A_N$, indicating the elements in array $A$. The $3^{rd}$ line contains $N$ intergers $u_1$, $u_2$, $\cdots$, $u_N$, and $u_i$ is $1$ if $A_i$ is $changeable$, otherwise $u_i$ is $0$.
The $4^{th}$ line and $5^{th}$ line describe the array $B$. The $4^{th}$ line contains $N$ intergers $B_1$, $B_2$, $\cdots$, $B_N$, indicating the elements in array $B$. The $5^{th}$ line contains $N$ intergers $v_1$, $v_2$, $\cdots$, $v_N$, and $v_i$ is $1$ if $B_i$ is $changeable$,otherwise $v_i$ is $0$.
The $6^{th}$ line and $7^{th}$ line describe the array $C$. The $6^{th}$ line contains $N$ intergers $C_1$, $C_2$, $\cdots$, $C_N$, indicating the elements in array $C$. The $7^{th}$ line contains $N$ intergers $w_1$, $w_2$, $\cdots$, $w_N$, and $w_i$ is $1$ if $C_i$ is $changeable$,otherwise $w_i$ is $0$.
$\cdot$ $1 \leq T \leq 2000$.
$\cdot$ for 75% data, $1 \leq N \leq 10$.
$\cdot$ for 95% data, $1 \leq N \leq 50$.
$\cdot$ for 100% data, $1 \leq N \leq 100$.
$\cdot$ $0 \leq A_i, B_i, C_i \leq 10^9$.
$\cdot$ both $u_i, v_i, w_i$ is either $0$ or $1$.