Write a function print_tree_inorder so that it puts parentheses around every operator and pair of operands.