Given a cactus graph, compute the maximum distance between two vertices.
Constraints
Input Specification
The first line contains two space-separated integers,
Output Specification
Output the diameter of the graph.
Sample Input
Copy
15 3
9 1 2 3 4 5 6 7 8 3
7 2 9 10 11 12 13 10
5 2 14 9 15 10
Sample Output
Copy
8
Comments
This comment is hidden due to too much negative feedback. Show it anyway.