




'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


a    :							List[str]										=    {
    'configuration_groupvit': [
        'GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'GroupViTConfig',
        'GroupViTOnnxConfig',
        'GroupViTTextConfig',
        'GroupViTVisionConfig',
    ],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a    :							Optional[int]										=    [
							    'GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'GroupViTModel',
							    'GroupViTPreTrainedModel',
							    'GroupViTTextModel',
							    'GroupViTVisionModel',
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a    :							Any										=    [
							    'TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'TFGroupViTModel',
							    'TFGroupViTPreTrainedModel',
							    'TFGroupViTTextModel',
							    'TFGroupViTVisionModel',
							]

if TYPE_CHECKING:
							from .configuration_groupvit import (
							    GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    GroupViTConfig,
							    GroupViTOnnxConfig,
							    GroupViTTextConfig,
							    GroupViTVisionConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_groupvit import (
														    GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    GroupViTModel,
														    GroupViTPreTrainedModel,
														    GroupViTTextModel,
														    GroupViTVisionModel,
														)

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_groupvit import (
														    TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFGroupViTModel,
														    TFGroupViTPreTrainedModel,
														    TFGroupViTTextModel,
														    TFGroupViTVisionModel,
														)

else:
							import sys

							a    :							Dict										=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)







'''simple docstring'''

import operator as op


def 						__magic_name__       (      __UpperCAmelCase      )						->   Dict:

					'''simple docstring'''

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

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

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

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

					return int(stack[0]      )


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

