Pikachu has already defeated so many legendary Pokemon, and is now organizing the Champions League where champions of all Conferences are going to battle for glory.
There are Conferences around the world, connected by exactly bidirectional roads. It is always possible to reach one Conference from another.
To choose the Champion of Champions, Pikachu chooses a set of Conferences. Now, each Conference champion in battles with every other Conference champion in and for each battle, one of the champion has to travel. Pikachu wants to know the maximum distance any champion would travel to battle.
Pikachu has thought of such sets. He wants to know the maximum distance for each set so that he can choose the least tiresome set.
Constraints:
Input format:
Output format: