






"""simple docstring"""






import operator as op



def       _A    (__a							)				-> Optional[Any]:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						Optional[Any]							=	[]
    SCREAMING_SNAKE_CASE_   :						Tuple							=	lambda __a					,       __a							: int(x / y							)  # noqa: E731 integer division operation
    SCREAMING_SNAKE_CASE_   :						Any							=	{
        '''^''': 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:
            SCREAMING_SNAKE_CASE_   :						List[str]							=	stack.pop()  # pop stack
            # output in tabular format
            print(''''''.rjust(8							)					,       ('''pop(''' + b + ''')''').ljust(12							)					,       ''','''.join(__a							)					,       sep=''' | '''							)

            SCREAMING_SNAKE_CASE_   :						Optional[int]							=	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__":
  UpperCAmelCase_     :				Optional[int]         =				input("""\n\nEnter a Postfix Equation (space separated) = """).split(""" """)
  print("""\n\tResult = """, solve(Postfix))










"""simple docstring"""






from __future__ import annotations



def       _A    (__a					,       __a					,       __a							)				-> int | float:
    """simple docstring"""






    if len(__a							) == 0:
        raise ValueError('''find_max() arg is an empty sequence'''							)
    if (
        left >= len(__a							)
        or left < -len(__a							)
        or right >= len(__a							)
        or right < -len(__a							)
    ):
        raise IndexError('''list index out of range'''							)
    if left == right:
        return nums[left]
    SCREAMING_SNAKE_CASE_   :						str							=	(left + right) >> 1  # the middle
    SCREAMING_SNAKE_CASE_   :						int							=	find_max(__a					,       __a					,       __a							)  # find max in range[left, mid]
    SCREAMING_SNAKE_CASE_   :						str							=	find_max(__a					,       mid + 1					,       __a							)  # find max in range[mid + 1, right]

    return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)


