# Center of a Tree
## Problem Statement
You are given a tree consisting of $n$ nodes. The nodes are numbered from $1$ to $n$. Your task is to find a specific type of "center" for this tree.
A tree's diameter is the longest path between any two nodes in the tree. Let $D$ be the diameter of the given tree. A node $u$ is considered a "specific center" if it lies on every diameter path and is equidistant from the endpoints of any diameter path. Such a node $u$ exists and is unique if and only if the diameter $D$ of the tree is an even number. In this case, $u$ is at distance $D/2$ from both endpoints of any diameter path. If the diameter $D$ is an odd number, there will be two adjacent nodes that are equidistant from the diameter endpoints (i.e., at distance $(D-1)/2$ from each). In this scenario, there is no single node that meets the definition of a "specific center" for this problem.
Your program should output the label of this unique "specific center" node if it exists. If the diameter is odd, and thus no such unique node exists, output $-1$.
## Input Format
- The first line contains an integer $n$ ($1 \le n \le 2 \times 10^5$): the number of nodes in the tree.
- The next $n-1$ lines describe the edges. Each line contains two integers $a$ and $b$ ($1 \le a, b \le n$): indicating an edge between nodes $a$ and $b$.
## Output Format
Print a single integer on one line: the label of the unique "specific center" node if the tree's diameter is even, or $-1$ if the tree's diameter is odd.
## Sample Test Cases
### Sample Input 1
```
3
1 2
1 3
```
### Sample Output 1
```
1
```
### Sample Input 2
```
4
1 2
2 3
3 4
```
### Sample Output 2
```
-1
```
## Constraints
- $1 \le n \le 2 \times 10^5$
- $1 \le a, b \le n$
- Time limit: 1 second
- Memory limit: 256 MB
## Explanation
### Sample 1
The tree consists of nodes $1, 2, 3$ with edges $(1,2)$ and $(1,3)$.
- The path $2-1-3$ has length $2$. This is the diameter of the tree, so $D=2$.
- Since $D=2$ is an even number, a unique "specific center" exists. The node $1$ is at distance $1$ from node $2$ and distance $1$ from node $3$.
- $D/2 = 2/2 = 1$. Node $1$ is at distance $1$ from both diameter endpoints.
- Thus, node $1$ is the unique "specific center".
### Sample 2
The tree consists of nodes $1, 2, 3, 4$ with edges $(1,2), (2,3), (3,4)$. This forms a path graph.
- The path $1-2-3-4$ has length $3$. This is the diameter of the tree, so $D=3$.
- Since $D=3$ is an odd number, there is no single node that is equidistant from the diameter endpoints and lies on all diameter paths. Instead, nodes $2$ and $3$ are the two "middle" nodes. Node $2$ is $1$ unit from $1$ and $2$ units from $4$. Node $3$ is $2$ units from $1$ and $1$ unit from $4$.
- According to the problem's definition, no unique "specific center" exists, so the output is $-1$.
Loading problem statement...