Created the tree from the list representation