
import operator as op







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

												UpperCamelCase_:							Optional[Any]	=						stack.pop()  # pop stack
												# output in tabular format
												print("""""".rjust(8						)     ,    ("""pop(""" + a + """)""").ljust(12						)     ,    """,""".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(12						)     ,    """,""".join(lowerCamelCase						)     ,    sep=""" | """     ,    )

				return int(stack[0]						)


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








import random







def        A__					(						lowerCamelCase     ,    lowerCamelCase     ,    lowerCamelCase = False						)  ->	dict:
				UpperCamelCase_:							dict	=						{i: [] for i in range(lowerCamelCase						)}

				# if probability is greater or equal than 1, then generate a complete graph
				if probability >= 1:
								return complete_graph(lowerCamelCase						)
				# if probability is lower or equal than 0, then return a graph without edges
				if probability <= 0:
								return graph

				# for each couple of nodes, add an edge from u to v
				# if the number randomly generated is greater than probability probability
				for i in range(lowerCamelCase						):
								for j in range(i + 1     ,    lowerCamelCase						):
												if random.random() < probability:
																graph[i].append(lowerCamelCase						)
																if not directed:
																				# if the graph is undirected, add an edge in from j to i, either
																				graph[j].append(lowerCamelCase						)
				return graph







def        A__					(						lowerCamelCase						)  ->	dict:
				return {
				    i: [j for j in range(lowerCamelCase						) if i != j] for i in range(lowerCamelCase						)
				}


if __name__ == "__main__":
							import doctest

							doctest.testmod()






