Longest path in tree