construct from pre, post and inorder traversal