Groupon interview question

Write code to print a tree in a particular order.