Longest path in a tree: Enunciado e input.