CF1406C Link Cut Centroids

题目描述

#### 题意 给定一棵节点数为 $n$ 的树 , 删一条边然后加上一条边 , 使得该树的重心唯一 。(删掉的边和加上的边可以是同一条)

输入格式

输出格式

说明/提示

Note that you can add the same edge that you cut. In the first test case, after cutting and adding the same edge, the vertex $ 2 $ is still the only centroid. In the second test case, the vertex $ 2 $ becomes the only centroid after cutting the edge between vertices $ 1 $ and $ 3 $ and adding the edge between vertices $ 2 $ and $ 3 $ .