import operator as op


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

						_lowerCamelCase				   =  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						=			input('\n\nEnter a Postfix Equation (space separated) = ').split(' ')
				print('\n\tResult = ', solve(Postfix))
import functools
from typing import Any


def 	lowerCamelCase					(	UpperCamelCase     :				str			,       UpperCamelCase     :				list[str]							)   ->    bool:

		# Validation
		if not isinstance(UpperCamelCase			,       UpperCamelCase							) or len(UpperCamelCase							) == 0:
				raise ValueError('the string should be not empty string'							)

		if not isinstance(UpperCamelCase			,       UpperCamelCase							) or not all(
		    isinstance(UpperCamelCase			,       UpperCamelCase							) and len(UpperCamelCase							) > 0 for item in words							):
				raise ValueError('the words should be a list of non-empty strings'							)

		# Build trie
		_lowerCamelCase				   =  {}
		_lowerCamelCase				   =  'WORD_KEEPER'

		for word in words:
				_lowerCamelCase				   =  trie
				for c in word:
						if c not in trie_node:
								_lowerCamelCase				   =  {}

						_lowerCamelCase				   =  trie_node[c]

				_lowerCamelCase				   =  True

		_lowerCamelCase				   =  len(UpperCamelCase							)

		# Dynamic programming method
		@functools.cache
		def is_breakable(UpperCamelCase     :				int							) -> bool:
				if index == len_string:
						return True

				_lowerCamelCase				   =  trie
				for i in range(UpperCamelCase			,       UpperCamelCase							):
						_lowerCamelCase				   =  trie_node.get(string[i]			,       UpperCamelCase							)

						if trie_node is None:
								return False

						if trie_node.get(UpperCamelCase			,       UpperCamelCase							) and is_breakable(i + 1							):
								return True

				return False

		return is_breakable(0							)


if __name__ == "__main__":
				import doctest

				doctest.testmod()