input: Write a python function to construct a binary search tree from a list of values.
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).val == 5
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).left.val == 3
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).right.val == 8
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).left.left.val == 1
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).left.right.val == 4
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).right.left.val == 7
  assert construct_tree([5, 3, 8, 1, 4, 7, 10]).right.right.val == 10
output: class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  def insert_into_bst(root, val):
      if root is None:
          return TreeNode(val)
      if val < root.val:
          root.left = insert_into_bst(root.left, val)
      else:
          root.right = insert_into_bst(root.right, val)
      return root
  
  def construct_tree(values):
      if not values:
          return None
      root = TreeNode(values[0])
      for val in values[1:]:
          insert_into_bst(root, val)
      return root