You are given a tree consisting of nodes.
The diameter of a tree is the maximum distance between two nodes. Your task is to determine the diameter of the tree.
The first line contains an integer — the number of nodes. The nodes are numbered , , ..., .
Then there are lines describing the edges. Each line contains two integers and — there is an edge between nodes and .
Print one integer — the diameter of the tree.