
"""simple docstring"""





def 				A_  (__a					):

					'''simple docstring'''





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

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

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

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

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

					return "".join(UpperCAmelCase__					)  # return Postfix as str
def 				A_  (__a					):

					'''simple docstring'''





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

					for i in range(len(UpperCAmelCase__					)					):
										if infix[i] == "(":
															A_								=    ")"  # change "(" to ")"
										elif infix[i] == ")":
															A_								=    "("  # change ")" to "("

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


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






lowercase   =	8.314_4598



def   __lowerCAmelCase    (				UpperCAmelCase__					:   float      ,					UpperCAmelCase__					:   float							)	->     float:
							if temperature < 0:
														raise Exception("""Temperature cannot be less than 0 K"""							)
							if molar_mass <= 0:
														raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""							)
							else:
														return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
		import doctest

		# run doctest
		doctest.testmod()

		# example
		lowercase   =	3_0_0
		lowercase   =	2_8
		lowercase   =	rms_speed_of_molecule(temperature, molar_mass)
		print(F"""Vrms of Nitrogen gas at 300 K is {vrms} m/s""")





