V8

Exercise 3 from Trees and Traversals