Verys interview question

Write a function to traverse a basic tree and print out a specific property attached to each node