import argparse
import datetime







def 			A__      (	snake_case_ :		str      ):
 SCREAMING_SNAKE_CASE__:   Union[str, Any]=      {
     '''0''': '''Sunday''',
     '''1''': '''Monday''',
     '''2''': '''Tuesday''',
     '''3''': '''Wednesday''',
     '''4''': '''Thursday''',
     '''5''': '''Friday''',
     '''6''': '''Saturday''',
 }

 SCREAMING_SNAKE_CASE__:   Optional[int]=      {0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

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

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

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

 # Get day
 SCREAMING_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
 SCREAMING_SNAKE_CASE__:   str=      date_input[5]
 # Validate
 if sep_a not in ["-", "/"]:
  raise ValueError('''Date separator must be \'-\' or \'/\''''      )

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

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

 # Start math
 if m <= 2:
  SCREAMING_SNAKE_CASE__:   int=      y - 1
  SCREAMING_SNAKE_CASE__:   Dict=      m + 12
 # maths var
 SCREAMING_SNAKE_CASE__:   int=      int(str(snake_case_      )[:2]      )
 SCREAMING_SNAKE_CASE__:   int=      int(str(snake_case_      )[2:]      )
 SCREAMING_SNAKE_CASE__:   int=      int(2.6 * m - 5.39      )
 SCREAMING_SNAKE_CASE__:   int=      int(c / 4      )
 SCREAMING_SNAKE_CASE__:   int=      int(k / 4      )
 SCREAMING_SNAKE_CASE__:   int=      int(d + k      )
 SCREAMING_SNAKE_CASE__:   int=      int(t + u + v + x      )
 SCREAMING_SNAKE_CASE__:   int=      int(z - (2 * c)      )
 SCREAMING_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
 SCREAMING_SNAKE_CASE__:   str=      F'Your date {date_input}, is a {days[str(snake_case_      )]}!'
 return response


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      lowercase_     :   List[str] 				=				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)'
      )
      lowercase_     :   Any 				=				parser.parse_args()
      zeller(args.date_input)


def 			A__      (	snake_case_ :		str      ):
 if not head:
  return True
 # split the list to two parts
 SCREAMING_SNAKE_CASE__,	SCREAMING_SNAKE_CASE__:   Optional[int]=      head.next, head
 while fast and fast.next:
  SCREAMING_SNAKE_CASE__:   Dict=      fast.next.next
  SCREAMING_SNAKE_CASE__:   Union[str, Any]=      slow.next
 SCREAMING_SNAKE_CASE__:   Union[str, Any]=      slow.next
 SCREAMING_SNAKE_CASE__:   Union[str, Any]=      None  # Don't forget here! But forget still works!
 # reverse the second part
 SCREAMING_SNAKE_CASE__:   Optional[int]=      None
 while second:
  SCREAMING_SNAKE_CASE__:   Any=      second.next
  SCREAMING_SNAKE_CASE__:   int=      node
  SCREAMING_SNAKE_CASE__:   Optional[Any]=      second
  SCREAMING_SNAKE_CASE__:   Any=      nxt
 # compare two parts
 # second part has the same or one less node
 while node:
  if node.val != head.val:
   return False
  SCREAMING_SNAKE_CASE__:   Tuple=      node.next
  SCREAMING_SNAKE_CASE__:   Optional[int]=      head.next
 return True







def 			A__      (	snake_case_ :		Optional[Any]      ):
 if not head or not head.next:
  return True

 # 1. Get the midpoint (slow)
 SCREAMING_SNAKE_CASE__:   List[Any]=      head
 while fast and fast.next:
  SCREAMING_SNAKE_CASE__,	SCREAMING_SNAKE_CASE__:   Any=      fast.next.next, slow.next

 # 2. Push the second half into the stack
 SCREAMING_SNAKE_CASE__:   Optional[Any]=      [slow.val]
 while slow.next:
  SCREAMING_SNAKE_CASE__:   Optional[int]=      slow.next
  stack.append(slow.val      )

 # 3. Comparison
 while stack:
  if stack.pop() != cur.val:
   return False
  SCREAMING_SNAKE_CASE__:   Tuple=      cur.next

 return True







def 			A__      (	snake_case_ :		Any      ):
 if not head or not head.next:
  return True
 SCREAMING_SNAKE_CASE__:   Optional[int]=      {}
 SCREAMING_SNAKE_CASE__:   Union[str, Any]=      0
 while head:
  if head.val in d:
   d[head.val].append(snake_case_      )
  else:
   SCREAMING_SNAKE_CASE__:   Optional[int]=      [pos]
  SCREAMING_SNAKE_CASE__:   Dict=      head.next
  pos += 1
 SCREAMING_SNAKE_CASE__:   Dict=      pos - 1
 SCREAMING_SNAKE_CASE__:   str=      0
 for v in d.values():
  if len(snake_case_      ) % 2 != 0:
   middle += 1
  else:
   SCREAMING_SNAKE_CASE__:   List[Any]=      0
   for i in range(0       ,				len(snake_case_      )      ):
    if v[i] + v[len(snake_case_      ) - 1 - step] != checksum:
     return False
    step += 1
  if middle > 1:
   return False
 return True

