'''simple docstring'''




import argparse


_lowercase						: Tuple						=						"docs/source/_static/js/custom.js"




def 							lowerCamelCase	(      UpperCAmelCase__       :					Dict )			->      int:
							with open(UpperCAmelCase__      ,      encoding="""utf-8"""      ,      newline="""\n""" ) as f:
														lowercase_					:			int										=       f.readlines()
							lowercase_					:			Any										=       0

							# First let's put the right version
							while not lines[index].startswith("""const stableVersion =""" ):
														index += 1
							lowercase_					:			Optional[Any]										=       F'''const stableVersion = "v{version}"\n'''

							# Then update the dictionary
							while not lines[index].startswith("""const versionMapping = {""" ):
														index += 1

							# We go until the end
							while not lines[index].startswith("""}""" ):
														index += 1
							# We add the new version at the end
							lines[index - 1] += F'''    "v{version}": "v{version}",\n'''

							with open(UpperCAmelCase__      ,      """w"""      ,      encoding="""utf-8"""      ,      newline="""\n""" ) as f:
														f.writelines(UpperCAmelCase__ )


if __name__ == "__main__":
						_lowercase						: Optional[int]						=						argparse.ArgumentParser()
						parser.add_argument("--version", help="Release version.")
						_lowercase						: Any						=						parser.parse_args()
						update_custom_js(args.version)






'''simple docstring'''




import operator as op




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

																					lowercase_					:			Optional[int]										=       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__":
						_lowercase						: Tuple						=						input("\n\nEnter a Postfix Equation (space separated) = ").split(" ")
						print("\n\tResult = ", solve(Postfix))





