Driver code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT root = newNode ( ' a ' ) ; NEW_LINE root . left = newNode ( ' b ' ) ; NEW_LINE root . right = newNode ( ' c ' ) ; NEW_LINE root . left . left = newNode ( ' d ' ) ; NEW_LINE root . left . right = newNode ( ' e ' ) ; NEW_LINE root . right . left = newNode ( ' f ' ) ; NEW_LINE root . right . right = newNode ( ' g ' ) ; NEW_LINE root . left . left . left = newNode ( ' h ' ) ; NEW_LINE root . left . left . right = newNode ( ' i ' ) ; NEW_LINE root . left . right . left = newNode ( ' j ' ) ; NEW_LINE root . left . right . right = newNode ( ' k ' ) ; NEW_LINE root . right . left . left = newNode ( ' l ' ) ; NEW_LINE root . right . left . right = newNode ( ' m ' ) ; NEW_LINE root . right . right . left = newNode ( ' n ' ) ; NEW_LINE root . right . right . right = newNode ( ' o ' ) ; NEW_LINE print ( " Inorder ▁ Traversal ▁ of ▁ given ▁ tree " ) NEW_LINE printInorder ( root ) ; NEW_LINE reverseAlternate ( root ) ; NEW_LINE print ( " Inorder Traversal of modified tree " ) NEW_LINE printInorder ( root ) ; NEW_LINE DEDENT