





"""simple docstring"""






def      __A   (      a_    :Optional[Any])		->		Optional[int]:
				__a			:    Any      							=	[]
				__a			:    Union[str, Any]      							=	[]
				__a			:    Dict      							=	{
				    '''^''': 3,
				    '''*''': 2,
				    '''/''': 2,
				    '''%''': 2,
				    '''+''': 1,
				    '''-''': 1,
				}  # Priority of each operator
				__a			:    Optional[Any]      							=	len(a_) if (len(a_) > 7) else 7

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

				for x in infix:
								if x.isalpha() or x.isdigit():
												post_fix.append(a_)  # if x is Alphabet / Digit, add it to Postfix
								elif x == "(":
												stack.append(a_)  # 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(a_) == 0:
																stack.append(a_)  # If stack is empty, push x to stack
												else:  # while priority of x is not > priority of element in the stack
																while len(a_) > 0 and priority[x] <= priority[stack[-1]]:
																				post_fix.append(stack.pop())  # pop stack & add to Postfix
																stack.append(a_)  # push x to stack

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

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

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

def      __A   (      a_    :Optional[int])		->		List[str]:
				__a			:    Any      							=	list(infix[::-1])  # reverse the infix equation

				for i in range(len(a_)):
								if infix[i] == "(":
												__a			:    Optional[int]      							=	''')'''  # change "(" to ")"
								elif infix[i] == ")":
												__a			:    int      							=	'''('''  # change ")" to "("

				return (infix_2_postfix(''''''.join(a_)))[
				    ::-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				,     lowercase				):







				"""simple docstring"""



				__lowercase					     =				len(lowercase				)
				__lowercase					     =				len(lowercase				)
				__lowercase					     =				[[False for _ in range(m + 1				)] for _ in range(n + 1				)]
				__lowercase					     =				True
				for i in range(lowercase				):
								for j in range(m + 1				):
												if dp[i][j]:
																if j < m and a[i].upper() == b[j]:
																				__lowercase					     =				True
																if a[i].islower():
																				__lowercase					     =				True
				return dp[n][m]


if __name__ == "__main__":
		import doctest

		doctest.testmod()