Big Fish Games Interview Question

Write a program to print out the data in all leaf nodes of a tree.