
class  _lowerCamelCase			:







     class  _lowerCamelCase			:
          lowercase__				  =			"""_prev""", """_data""", """_next"""

          def __init__(  self							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_    ):
                 __snake_case						       =   link_p
                 __snake_case						       =   element
                 __snake_case						       =   link_n

          def 						__lowerCamelCase				(  self    ):
                 return (
                     f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
                 )





     def __init__(  self    ):
            __snake_case						       =   self._Node(SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_    )
            __snake_case						       =   self._Node(SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_    )
            __snake_case						       =   self._trailer
            __snake_case						       =   self._header
            __snake_case						       =   0

     def __len__(  self    ):
            return self._size

     def 						__lowerCamelCase				(  self    ):
            return self.__len__() == 0

     def 						__lowerCamelCase				(  self							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_    ):
            # Create new_node by setting it's prev.link -> header
            # setting it's next.link -> trailer
            __snake_case						       =   self._Node(SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_    )
            __snake_case						       =   new_node
            __snake_case						       =   new_node
            self._size += 1
            return self

     def 						__lowerCamelCase				(  self							,       SCREAMING_SNAKE_CASE_    ):
            __snake_case						       =   node._prev
            __snake_case						       =   node._next

            __snake_case						       =   successor
            __snake_case						       =   predecessor
            self._size -= 1
            __snake_case						       =   node._data
            __snake_case						       =   __snake_case						       =   __snake_case						       =   None
            del node
            return temp







class  _lowerCamelCase			(_DoublyLinkedBase					):

     def 						__lowerCamelCase				(  self    ):
            if self.is_empty():
                   raise Exception('List is empty'    )
            return self._header._next._data

     def 						__lowerCamelCase				(  self    ):
            if self.is_empty():
                   raise Exception('List is empty'    )
            return self._trailer._prev._data

     def 						__lowerCamelCase				(  self							,       SCREAMING_SNAKE_CASE_    ):
            return self._insert(self._header							,       SCREAMING_SNAKE_CASE_							,       self._header._next    )

     def 						__lowerCamelCase				(  self							,       SCREAMING_SNAKE_CASE_    ):
            return self._insert(self._trailer._prev							,       SCREAMING_SNAKE_CASE_							,       self._trailer    )

     def 						__lowerCamelCase				(  self    ):
            if self.is_empty():
                   raise IndexError('remove_first from empty list'    )
            return self._delete(self._header._next    )

     def 						__lowerCamelCase				(  self    ):
            if self.is_empty():
                   raise IndexError('remove_first from empty list'    )
            return self._delete(self._trailer._prev    )







from __future__ import annotations
def  __UpperCamelCase    (						snake_case      )    ->		bool:


   '''simple docstring'''







   __A    =  42
   __A    =  list(snake_case      )
   __A   ,		__A    =  _vector[:-1], int(_vector[-1]      )
   __A    =  [int(snake_case      ) for digit in __vector]

   vector.reverse()
   for i, digit in enumerate(snake_case      ):
      if i & 1 == 0:
         __A    =  digit * 2
         if doubled > 9:
            doubled -= 9
         check_digit += doubled
      else:
         check_digit += digit

   return check_digit % 1_0 == 0


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    assert is_luhn("""79927398713""")
    assert not is_luhn("""79927398714""")

