input: Write a python function to construct a binary tree from its preorder and inorder traversal lists.
  assert construct_tree(["A", "B", "E", "K", "C", "F", "G", "D"], ["E", "B", "K", "A", "F", "C", "D", "G"]).data == "A"
  assert construct_tree(["A", "B", "E", "K", "C", "F", "G", "D"], ["E", "B", "K", "A", "F", "C", "D", "G"]).left.data == "B"
  assert construct_tree(["A", "B", "E", "K", "C", "F", "G", "D"], ["E", "B", "K", "A", "F", "C", "D", "G"]).right.data == "C"
output: class TreeNode:
      def __init__(self, data):
          self.data = data
          self.left = None
          self.right = None
  
  def construct_tree(preorder, inorder):
      if not preorder or not inorder:
          return None
  
      root_data = preorder[0]
      root = TreeNode(root_data)
  
      root_index_inorder = inorder.index(root_data)
  
      left_inorder = inorder[:root_index_inorder]
      right_inorder = inorder[root_index_inorder + 1:]
  
      left_preorder = preorder[1:1 + len(left_inorder)]
      right_preorder = preorder[1 + len(left_inorder):]
  
      root.left = construct_tree(left_preorder, left_inorder)
      root.right = construct_tree(right_preorder, right_inorder)
  
      return root