Antwanland is a tree of size $$$n$$$ (a tree is a connected graph with no loops), and Antwan has a lucky number $$$k$$$.
Antwan wants to reduce the size of his land to $$$k$$$ while ensuring it remains a connected tree.
The citizens of Antwanland are smart and always travel the shortest path between any two cities.
Antwan cares about his citizens and wants to choose $$$k$$$ cities such that the maximum journey (number of cities) between any two cities is minimized.
Can you help Antwan achieve this?
The first line contains two integers $$$n$$$ and $$$k \: (1 \le k \le n \le 10^3)$$$ — the size of Antwanland and his lucky number.
Each of the next $$$n - 1$$$ lines contains two integers $$$v$$$ and $$$u \: (1 \le v , u \le n)$$$ — the description of the edges of the tree. It's guaranteed that the given edges form a valid tree.
A single integer, the minimum maximum journey between any two cities after helping Antwan.
4 31 22 33 4
3
7 31 21 31 42 53 64 7
3