Modify TreeNode to BinaryNode.
Add ternary tree.