input: Write a python function to build a binary tree from inorder and postorder traversal arrays.
  assert printInorder(buildTree([4, 2, 5, 1, 6, 3], [4, 5, 2, 6, 3, 1], 0, 5)) == "4 2 5 1 6 3 "
  assert printInorder(buildTree([9, 3, 15, 20, 7], [9, 15, 7, 20, 3], 0, 4)) == "9 3 15 20 7 "
  assert printInorder(buildTree([2, 1, 3], [2, 3, 1], 0, 2)) == "2 1 3 "
output: class TreeNode:
      def __init__(self, x):
          self.val = x
          self.left = None
          self.right = None
  
  def buildTree(inorder, postorder, inStart, inEnd):
      if inStart > inEnd:
          return None
  
      # The last element in postorder is the root of the current subtree
      root_val = postorder[buildTree.postIndex]
      root = TreeNode(root_val)
      buildTree.postIndex -= 1
  
      if inStart == inEnd:
          return root
  
      inIndex = inorder.index(root_val)
  
      root.right = buildTree(inorder, postorder, inIndex + 1, inEnd)
      root.left = buildTree(inorder, postorder, inStart, inIndex - 1)
  
      return root
  
  def printInorder(node):
      if not node:
          return ""
      return printInorder(node.left) + str(node.val) + " " + printInorder(node.right)
  
  # Initialize postIndex as the last index of the postorder array
  buildTree.postIndex = None
  def wrapperBuildTree(inorder, postorder, inStart, inEnd):
      buildTree.postIndex = len(postorder) - 1
      return buildTree(inorder, postorder, inStart, inEnd)
  
  # Wrapper function to match the required function signature
  def buildTree(inorder, postorder, inStart, inEnd):
      return wrapperBuildTree(inorder, postorder, inStart, inEnd)