
"""simple docstring"""


from math import ceil






def  lowercase						(	lowerCAmelCase__	,lowerCAmelCase__						):
			lowerCamelCase_					=  list(range(0	,lowerCAmelCase__						)						)

			lowerCamelCase_					=  [item for sublist in list(device_map.values()						) for item in sublist]

			# Duplicate check
			lowerCamelCase_					=  []
			for i in device_map_blocks:
						if device_map_blocks.count(lowerCAmelCase__						) > 1 and i not in duplicate_blocks:
									duplicate_blocks.append(lowerCAmelCase__						)
    # Missing blocks
			lowerCamelCase_					=  [i for i in blocks if i not in device_map_blocks]
			lowerCamelCase_					=  [i for i in device_map_blocks if i not in blocks]

			if len(lowerCAmelCase__						) != 0:
						raise ValueError(
						    '''Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device.'''
						    ''' These attention blocks were specified more than once: ''' + str(lowerCAmelCase__						)						)
			if len(lowerCAmelCase__						) != 0:
						raise ValueError(
						    '''There are attention blocks for this model that are not specified in the device_map. Add these attention '''
						    '''blocks to a device on the device_map: ''' + str(lowerCAmelCase__						)						)
			if len(lowerCAmelCase__						) != 0:
						raise ValueError(
						    '''The device_map contains more attention blocks than this model has. Remove these from the device_map:'''
						    + str(lowerCAmelCase__						)						)






def  lowercase						(	lowerCAmelCase__	,lowerCAmelCase__						):
			lowerCamelCase_					=  list(range(lowerCAmelCase__						)						)
			lowerCamelCase_					=  int(ceil(n_layers / len(lowerCAmelCase__						)						)						)
			lowerCamelCase_					=  [layers[i : i + n_blocks] for i in range(0	,lowerCAmelCase__	,lowerCAmelCase__						)]

			return dict(zip(lowerCAmelCase__	,lowerCAmelCase__						)						)










import operator as op


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

    # print table header
    print('''Symbol'''.center(8	) ,							'''Action'''.center(1_2	) ,							'''Stack''' ,							sep=''' | '''	)
    print('''-''' * (3_0 + len(lowerCAmelCase_	))	)

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

            SCREAMING_SNAKE_CASE__											=			stack.pop()  # pop stack
            # output in tabular format
            print(''''''.rjust(8	) ,							('''pop(''' + a + ''')''').ljust(1_2	) ,							''','''.join(lowerCAmelCase_	) ,							sep=''' | '''	)

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

    return int(stack[0]	)


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