You are given a tree with $$$n$$$ vertices, numbered from $$$1$$$ to $$$n$$$. Initially, all vertices are white.
You must choose a single integer $$$k$$$ from $$$1$$$ to $$$2n$$$, inclusive. Then, for each $$$i$$$ from $$$1$$$ to $$$n$$$ in increasing order, if the tree contains a vertex numbered $$$k-i$$$ and $$$k-i \ne i$$$, the following operation is performed:
You must choose $$$k$$$ to maximize the number of black vertices (higher priority) and the number of gray vertices (lower priority). In other words, choose $$$k$$$ so that the number of black vertices in the tree is as large as possible, and among the values of $$$k$$$ that give the maximum number of black vertices, choose one that gives as many gray vertices as possible.
Find any optimal value of $$$k$$$. If there are multiple suitable values of $$$k$$$, print any of them.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
The first line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 3 \cdot 10^5$$$) — the number of vertices in the tree.
Each of the following $$$n-1$$$ lines contains two integers $$$u$$$ and $$$v$$$ ($$$1 \le u,v \le n$$$) — the vertices connected by an edge.
Additional constraints on the input:
For each test case, print one integer $$$k$$$ ($$$1 \le k \le 2n$$$) that satisfies the requirements of the problem. If there are multiple optimal values, output any of them.
551 21 33 44 561 22 32 44 54 655 11 33 22 455 15 25 35 453 44 11 22 5
67755
In the first test case, $$$k=6$$$ is chosen. After all operations, vertices $$$1$$$, $$$2$$$, $$$4$$$, and $$$5$$$ are black, and vertex $$$3$$$ is gray.
In the second test case, $$$k=7$$$ is chosen. After all operations, all six vertices are black, and there are no gray vertices.