




def 					__SCREAMING_SNAKE_CASE   (  lowercase_      )       ->	List[Any]:

    """simple docstring"""


    if not head:
        return True
    # split the list to two parts
    __UpperCamelCase  		=						head.next, head
    while fast and fast.next:
        __UpperCamelCase  		=						fast.next.next
        __UpperCamelCase  		=						slow.next
    __UpperCamelCase  		=						slow.next
    __UpperCamelCase  		=						None  # Don't forget here! But forget still works!
    # reverse the second part
    __UpperCamelCase  		=						None
    while second:
        __UpperCamelCase  		=						second.next
        __UpperCamelCase  		=						node
        __UpperCamelCase  		=						second
        __UpperCamelCase  		=						nxt
    # compare two parts
    # second part has the same or one less node
    while node:
        if node.val != head.val:
            return False
        __UpperCamelCase  		=						node.next
        __UpperCamelCase  		=						head.next
    return True




def 					__SCREAMING_SNAKE_CASE   (  lowercase_      )       ->	Dict:

    """simple docstring"""


    if not head or not head.next:
        return True

    # 1. Get the midpoint (slow)
    __UpperCamelCase  		=						head
    while fast and fast.next:
        __UpperCamelCase  		=						fast.next.next, slow.next

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

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

    return True




def 					__SCREAMING_SNAKE_CASE   (  lowercase_      )       ->	Optional[Any]:

    """simple docstring"""


    if not head or not head.next:
        return True
    __UpperCamelCase  		=						{}
    __UpperCamelCase  		=						0
    while head:
        if head.val in d:
            d[head.val].append(lowercase_      )
        else:
            __UpperCamelCase  		=						[pos]
        __UpperCamelCase  		=						head.next
        pos += 1
    __UpperCamelCase  		=						pos - 1
    __UpperCamelCase  		=						0
    for v in d.values():
        if len(lowercase_      ) % 2 != 0:
            middle += 1
        else:
            __UpperCamelCase  		=						0
            for i in range(0					,     len(lowercase_      )      ):
                if v[i] + v[len(lowercase_      ) - 1 - step] != checksum:
                    return False
                step += 1
        if middle > 1:
            return False
    return True












from abc import ABC, abstractmethod
from argparse import ArgumentParser

class  _lowerCamelCase						(			_SCREAMING_SNAKE_CASE   ):

      """simple docstring"""

      @staticmethod
      @abstractmethod
      def       snake_case	(     snake_case					: ArgumentParser				):
          raise NotImplementedError()







      @abstractmethod
      def       snake_case	(     self					: Optional[Any]				):
          raise NotImplementedError()






