The first line contains one integer $T \left( 1 \leq T \leq 10 \right)$, indicating the number of test cases.
For each test case:
The first line contains one integer $n \left( 1 \le n \le 5 \cdot 10^5 \right)$, indicating the number of nodes.
In the following $n-1$ lines, each line contains two interger $u, v \left(1 \le u, v \le n \right)$, indicating an edge $\left( u, v \right)$ of the tree.
A guarantee is that forming trees.