Utopian Tree:
Mostly done. But it is off on Input:
2
3
4

with output:
4
5
(should be 6, 7)