Made a TreeNode class and a Main class.