Palo Alto Networks interview question

Construct a tree from data, then print the tree