






def __A    (      __lowerCAmelCase	)->  Union[str, Any]:





						"""simple docstring"""



						_UpperCAmelCase									=			[]
						_UpperCAmelCase									=			[]
						_UpperCAmelCase									=			{
						    '^': 3,
						    '*': 2,
						    '/': 2,
						    '%': 2,
						    '+': 1,
						    '-': 1,
						}  # Priority of each operator
						_UpperCAmelCase									=			len(__lowerCAmelCase	) if (len(__lowerCAmelCase	) > 7) else 7

						# Print table header for output
						print(
						    'Symbol'.center(8	) ,		'Stack'.center(__lowerCAmelCase	) ,		'Postfix'.center(__lowerCAmelCase	) ,		sep=' | ' ,		)
						print('-' * (print_width * 3 + 7)	)

						for x in infix:
												if x.isalpha() or x.isdigit():
																		post_fix.append(__lowerCAmelCase	)  # if x is Alphabet / Digit, add it to Postfix
												elif x == "(":
																		stack.append(__lowerCAmelCase	)  # if x is "(" push to Stack
												elif x == ")":  # if x is ")" pop stack until "(" is encountered
																		while stack[-1] != "(":
																								post_fix.append(stack.pop()	)  # Pop stack & add the content to Postfix
																		stack.pop()
												else:
																		if len(__lowerCAmelCase	) == 0:
																								stack.append(__lowerCAmelCase	)  # If stack is empty, push x to stack
																		else:  # while priority of x is not > priority of element in the stack
																								while len(__lowerCAmelCase	) > 0 and priority[x] <= priority[stack[-1]]:
																														post_fix.append(stack.pop()	)  # pop stack & add to Postfix
																								stack.append(__lowerCAmelCase	)  # push x to stack

												print(
												    x.center(8	) ,		(''.join(__lowerCAmelCase	)).ljust(__lowerCAmelCase	) ,		(''.join(__lowerCAmelCase	)).ljust(__lowerCAmelCase	) ,		sep=' | ' ,		)  # Output in tabular format

						while len(__lowerCAmelCase	) > 0:  # while stack is not empty
												post_fix.append(stack.pop()	)  # pop stack & add to Postfix
												print(
												    ' '.center(8	) ,		(''.join(__lowerCAmelCase	)).ljust(__lowerCAmelCase	) ,		(''.join(__lowerCAmelCase	)).ljust(__lowerCAmelCase	) ,		sep=' | ' ,		)  # Output in tabular format

						return "".join(__lowerCAmelCase	)  # return Postfix as str


def __A    (      __lowerCAmelCase	)->  Tuple:





						"""simple docstring"""



						_UpperCAmelCase									=			list(infix[::-1]	)  # reverse the infix equation

						for i in range(len(__lowerCAmelCase	)	):
												if infix[i] == "(":
																		_UpperCAmelCase									=			')'  # change "(" to ")"
												elif infix[i] == ")":
																		_UpperCAmelCase									=			'('  # change ")" to "("

						return (infix_2_postfix(''.join(__lowerCAmelCase	)	))[
						    ::-1
						]  # call infix_2_postfix on Infix, return reverse of Postfix


if __name__ == "__main__":
		_a      	=  input('''\nEnter an Infix Equation = ''')  # Input an Infix equation
		_a      	=  ''''''.join(Infix.split())  # Remove spaces from the input
		print('''\n\t''', Infix, '''(Infix) -> ''', infix_2_prefix(Infix), '''(Prefix)''')



def 						UpperCamelCase					(lowercase_: int = 10					)     ->      str:
	if not isinstance(lowercase_    ,      lowercase_					) or n < 0:
		raise ValueError("""Invalid input"""					)
	A__							:    List[str]        =		10**n
	A__							:    Any        =		28433 * (pow(2    ,      7830457    ,      lowercase_					)) + 1
	return str(number % modulus					)


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	print(f'''{solution(10) = }''')



