There are multiple test cases. The first line of input contains an integer TT, indicating the number of test cases. For each test case:
The first line contains two integer nn and mm (1 \le n, m \le 10^5)(1≤n,m≤105) -- the number of vertices and the number of queries. The next line contains 6 integers a_1, b_1, a_2, b_2, a_3, b_3a1,b1,a2,b2,a3,b3 (1 \le a_1,a_2,a_3,b_1,b_2,b_3 \le n)(1≤a1,a2,a3,b1,b2,b3≤n), separated by a space, denoting the new added three edges are (a_1,b_1)(a1,b1), (a_2,b_2)(a2,b2), (a_3,b_3)(a3,b3