





import argparse
import datetime







def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    str:
  __snake_case:						List[Any]   =						{
      """0""": """Sunday""",
      """1""": """Monday""",
      """2""": """Tuesday""",
      """3""": """Wednesday""",
      """4""": """Thursday""",
      """5""": """Friday""",
      """6""": """Saturday""",
  }

  __snake_case:						Tuple   =						{0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

  # Validate
  if not 0 < len(SCREAMING_SNAKE_CASE__) < 11:
    raise ValueError("""Must be 10 characters long""")

  # Get month
  __snake_case:						int   =						int(date_input[0] + date_input[1])
  # Validate
  if not 0 < m < 13:
    raise ValueError("""Month must be between 1 - 12""")

  __snake_case:						str   =						date_input[2]
  # Validate
  if sep_a not in ["-", "/"]:
    raise ValueError("""Date separator must be '-' or '/'""")

  # Get day
  __snake_case:						int   =						int(date_input[3] + date_input[4])
  # Validate
  if not 0 < d < 32:
    raise ValueError("""Date must be between 1 - 31""")

  # Get second separator
  __snake_case:						str   =						date_input[5]
  # Validate
  if sep_a not in ["-", "/"]:
    raise ValueError("""Date separator must be '-' or '/'""")

  # Get year
  __snake_case:						int   =						int(date_input[6] + date_input[7] + date_input[8] + date_input[9])
  # Arbitrary year range
  if not 45 < y < 8500:
    raise ValueError(
        """Year out of range. There has to be some sort of limit...right?""")

  # Get datetime obj for validation
  __snake_case:						List[Any]   =						datetime.date(int(SCREAMING_SNAKE_CASE__)					,					int(SCREAMING_SNAKE_CASE__)					,					int(SCREAMING_SNAKE_CASE__))

  # Start math
  if m <= 2:
    __snake_case:						Optional[int]   =						y - 1
    __snake_case:						Dict   =						m + 12
  # maths var
  __snake_case:						int   =						int(str(SCREAMING_SNAKE_CASE__)[:2])
  __snake_case:						int   =						int(str(SCREAMING_SNAKE_CASE__)[2:])
  __snake_case:						int   =						int(2.6 * m - 5.39)
  __snake_case:						int   =						int(c / 4)
  __snake_case:						int   =						int(k / 4)
  __snake_case:						int   =						int(d + k)
  __snake_case:						int   =						int(t + u + v + x)
  __snake_case:						int   =						int(z - (2 * c))
  __snake_case:						int   =						round(w % 7)
  # End math

  # Validate math
  if f != convert_datetime_days[dt_ck.weekday()]:
    raise AssertionError("""The date was evaluated incorrectly. Contact developer.""")

  # Response
  __snake_case:						str   =						F'''Your date {date_input}, is a {days[str(SCREAMING_SNAKE_CASE__)]}!'''
  return response


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      __UpperCAmelCase       :   Any				       =							argparse.ArgumentParser(
          description=(
              "Find out what day of the week nearly any date is or was. Enter "
              "date as a string in the mm-dd-yyyy or mm/dd/yyyy format"
          )
      )
      parser.add_argument(
          "date_input", type=str, help="Date as a string (mm-dd-yyyy or mm/dd/yyyy)"
      )
      __UpperCAmelCase       :   List[Any]				       =							parser.parse_args()
      zeller(args.date_input)













def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    Union[str, Any]:
  __snake_case:						List[Any]   =						[]
  __snake_case:						List[str]   =						[]
  __snake_case:						List[str]   =						{
      """^""": 3,
      """*""": 2,
      """/""": 2,
      """%""": 2,
      """+""": 1,
      """-""": 1,
  }  # Priority of each operator
  __snake_case:						Union[str, Any]   =						len(SCREAMING_SNAKE_CASE__) if (len(SCREAMING_SNAKE_CASE__) > 7) else 7

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

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

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

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

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







def 			A__							(    SCREAMING_SNAKE_CASE__)   ->    Tuple:
  __snake_case:						Optional[int]   =						list(infix[::-1])  # reverse the infix equation

  for i in range(len(SCREAMING_SNAKE_CASE__)):
    if infix[i] == "(":
      __snake_case:						int   =						""")"""  # change "(" to ")"
    elif infix[i] == ")":
      __snake_case:						Dict   =						"""("""  # change ")" to "("

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


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






