The first line contains an integer $T(1 \le T \le 5)$, the number of test cases.
For each test case, the first line contains two integers $n, m(2 \le n \le 300000, 1 \le m \le 300000)$, denoting the number of points and the number of edge respectively.
Then $m$ lines followed, each line contains three integers $x, y, w(1 \le x, y \le n, 0 \le w \le 10^9)$, denoting an edge between $x, y$ with value $w$.
The number of test case with $n, m > 100000$ will not exceed 1.