The first line contains one integer T(1≤T≤8),indicating the number of test cases.
The second line contains two ingeters n,m(1≤n≤105,1≤m≤2×105).
The third line contains npositive integers a1,a2,...,an(ai=0or 1) —— the value of the nodes.
The following mlines contain two ingeters u,v(1≤u,v≤n), and the i-th line represents the i-th undirected edge’s length is 2i, between node uand v.
The sum of n,mis no more than 2×105.