Question about Tree DS

Hi
I have a question and can't find its answare
Question:
Input : a tree

Want: return 3 vertex of tree that union of edges between pairwise simple paths of them is maximum

Output: maximum and 3 vertexes

input sample 1:
8
1 2
2 3
3 4
4 5
4 6
3 7
3 8

output desired1 :
5
1
5
6

Comments (1)