

'''simple docstring'''


import operator as op







def 	__magic_name__( _A					):
						'''simple docstring'''





						UpperCamelCase__         = []
						UpperCamelCase__         = lambda _A						,      _A					: int(x / y					)  # noqa: E731 integer division operation
						UpperCamelCase__         = {
						    """^""": 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(_A					))					)

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

																		UpperCamelCase__         = stack.pop()  # pop stack
																		# output in tabular format
																		print("""""".rjust(8					)						,      ("""pop(""" + a + """)""").ljust(12					)						,      """,""".join(_A					)						,      sep=""" | """					)

																		stack.append(
																		    str(opr[x](int(_A					)						,      int(_A					)					)					)					)  # 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(_A					)						,      sep=""" | """						,      )

						return int(stack[0]					)


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








'''simple docstring'''


import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


lowerCamelCase_				: Any    	=							{
    '''debug''': logging.DEBUG,
    '''info''': logging.INFO,
    '''warning''': logging.WARNING,
    '''error''': logging.ERROR,
    '''critical''': logging.CRITICAL,
}

lowerCamelCase_				: Optional[int]    	=							logging.WARNING







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = os.getenv("""DATASETS_VERBOSITY"""						,      _A					)
						if env_level_str:
												if env_level_str in log_levels:
																		return log_levels[env_level_str]
												else:
																		logging.getLogger().warning(
																		    f"Unknown option DATASETS_VERBOSITY={env_level_str}, "
																		    f"has to be one of: { ', '.join(log_levels.keys()					) }"					)
						return _default_log_level







def 	__magic_name__( ):
						'''simple docstring'''





						return __name__.split("""."""					)[0]







def 	__magic_name__( ):
						'''simple docstring'''





						return logging.getLogger(_get_library_name()					)







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = _get_library_root_logger()
						library_root_logger.setLevel(_get_default_logging_level()					)







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = _get_library_root_logger()
						library_root_logger.setLevel(logging.NOTSET					)







def 	__magic_name__( _A = None					):
						'''simple docstring'''





						if name is None:
												UpperCamelCase__         = _get_library_name()
						return logging.getLogger(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						return _get_library_root_logger().getEffectiveLevel()







def 	__magic_name__( _A					):
						'''simple docstring'''





						_get_library_root_logger().setLevel(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						return set_verbosity(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						return set_verbosity(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						return set_verbosity(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						return set_verbosity(_A					)







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = False







def 	__magic_name__( ):
						'''simple docstring'''





						UpperCamelCase__         = True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()
class    _SCREAMING_SNAKE_CASE							:


			'''simple docstring'''





			def __init__(   self							:						int ,      *lowercase							:						Any ,      **lowercase							:						int			)							->    List[Any]:  # pylint: disable=unused-argument

									'''simple docstring'''







									UpperCamelCase__         = args[0] if args else None






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

									'''simple docstring'''







									return iter(self._iterator			)






			def __getattr__(   self							:						Optional[int] ,      lowercase							:						Tuple			)							->    int:

									'''simple docstring'''







									def empty_fn(*lowercase							:						List[Any] ,      **lowercase							:						Dict			):  # pylint: disable=unused-argument
															return

									return empty_fn






			def __enter__(   self							:						Dict			)							->    Tuple:

									'''simple docstring'''







									return self







			def __exit__(   self							:						Tuple ,      lowercase							:						Optional[Any] ,      lowercase							:						Any ,      lowercase							:						int			)							->    Any:

									'''simple docstring'''







									return
lowerCamelCase_				: str    	=							True
class    _SCREAMING_SNAKE_CASE							:


			'''simple docstring'''





			def __call__(   self							:						List[Any] ,      *lowercase							:						str ,      lowercase							:						Optional[int]=False ,      **lowercase							:						Optional[int]			)							->    Optional[int]:

									'''simple docstring'''







									if _tqdm_active and not disable:
															return tqdm_lib.tqdm(*lowercase ,      **lowercase			)
									else:
															return EmptyTqdm(*lowercase ,      **lowercase			)






			def 				A      (   self							:						Optional[Any] ,      *lowercase							:						Tuple ,      **lowercase							:						Any			)							->    Any:

									'''simple docstring'''







									UpperCamelCase__         = None
									if _tqdm_active:
															return tqdm_lib.tqdm.set_lock(*lowercase ,      **lowercase			)







			def 				A      (   self							:						Optional[Any]			)							->    Optional[Any]:

									'''simple docstring'''







									if _tqdm_active:
															return tqdm_lib.tqdm.get_lock()
lowerCamelCase_				: int    	=							_tqdm_cls()







def 	__magic_name__( ):
						'''simple docstring'''





						global _tqdm_active
						return bool(_tqdm_active					)







def 	__magic_name__( ):
						'''simple docstring'''





						global _tqdm_active
						UpperCamelCase__         = True







def 	__magic_name__( ):
						'''simple docstring'''





						global _tqdm_active
						UpperCamelCase__         = False
