Palo Alto Networks Interview Question

Construct a tree from data, then print the tree