


import operator as op
def 			_a (      SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		lowercase__            =      []
		lowercase__            =      lambda SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE     : int(x / y     )  # noqa: E731 integer division operation
		lowercase__            =      {
		    '''^''': op.pow,
		    '''*''': op.mul,
		    '''/''': div,
		    '''+''': op.add,
		    '''-''': op.sub,
		}  # operators & their respective operation

		# print table header
		print('''Symbol'''.center(8     )						,				'''Action'''.center(12     )						,				'''Stack'''						,				sep=''' | '''     )
		print('''-''' * (30 + len(SCREAMING_SNAKE_CASE     ))     )

		for x in post_fix:
				if x.isdigit():  # if x in digit
						stack.append(SCREAMING_SNAKE_CASE     )  # append x to stack
						# output in tabular format
						print(x.rjust(8     )						,				('''push(''' + x + ''')''').ljust(12     )						,				''','''.join(SCREAMING_SNAKE_CASE     )						,				sep=''' | '''     )
				else:
						lowercase__            =      stack.pop()  # pop stack
						# output in tabular format
						print(''''''.rjust(8     )						,				('''pop(''' + b + ''')''').ljust(12     )						,				''','''.join(SCREAMING_SNAKE_CASE     )						,				sep=''' | '''     )

						lowercase__            =      stack.pop()  # pop stack
						# output in tabular format
						print(''''''.rjust(8     )						,				('''pop(''' + a + ''')''').ljust(12     )						,				''','''.join(SCREAMING_SNAKE_CASE     )						,				sep=''' | '''     )

						stack.append(
						    str(opr[x](int(SCREAMING_SNAKE_CASE     )						,				int(SCREAMING_SNAKE_CASE     )     )     )     )  # evaluate the 2 values popped from stack & push result to stack
						# output in tabular format
						print(
						    x.rjust(8     )						,				('''push(''' + a + x + b + ''')''').ljust(12     )						,				''','''.join(SCREAMING_SNAKE_CASE     )						,				sep=''' | '''						,				)

		return int(stack[0]     )


if __name__ == "__main__":
			lowerCAmelCase       =							input('\n\nEnter a Postfix Equation (space separated) = ').split(' ')
			print('\n\tResult = ', solve(Postfix))






from __future__ import annotations

from collections.abc import Iterator


class        _a							:

							def __init__(							self:	List[str]    ,						UpperCamelCase_:	int							)			->   None:





									"""simple docstring"""







									lowercase__            =      value
									lowercase__            =      None
									lowercase__            =      None


class        _a							:

							def __init__(							self:	Union[str, Any]    ,						UpperCamelCase_:	Node							)			->   None:





									"""simple docstring"""







									lowercase__            =      tree

							def       lowerCamelCase_ (							self:	Any    ,						UpperCamelCase_:	Node | None							)			->   int:





									"""simple docstring"""







									if node is None:
											return 0
									return node.value + (
									    self.depth_first_search(node.left							) + self.depth_first_search(node.right							)
									)


							def __iter__(							self:	List[str]							)			->   Iterator[int]:





									"""simple docstring"""







									yield self.depth_first_search(self.tree							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()


