The first line contains one integer $T$($1\le T \le 8$),indicating the number of test cases.
The second line contains two ingeters $n,m$($1\le n\le 10^5,1\le m\le 2\times 10^5$).
The third line contains $n$ positive integers $a_1,a_2,...,a_n(a_i = 0$ or $1$) —— the value of the nodes.
The following $m$ lines contain two ingeters $u,v(1
\le u,v \le n)$, and the $i$-th line represents the i-th undirected edge’s length is $2^i$, between node $u$ and $v$.
The sum of $n,m$ is no more than $2\times 10^5$.