




class 	_lowerCamelCase  :

      """simple docstring"""

      class 	_lowerCamelCase  :

            """simple docstring"""

            lowerCAmelCase__     :	Tuple      =   "_prev", "_data", "_next"







            def __init__(       self   :	Optional[Any]	,    snake_case   :	Optional[Any]	,    snake_case   :	List[str]	,    snake_case   :	Dict			):
                __UpperCamelCase											=  link_p
                __UpperCamelCase											=  element
                __UpperCamelCase											=  link_n







            def  snake_case		(       self   :	List[str]			):
                return (
                    F" Prev -> {self._prev is not None}, Next -> {self._next is not None}"
                )







      def __init__(       self   :	List[str]			):
          __UpperCamelCase											=  self._Node(snake_case	,    snake_case	,    snake_case			)
          __UpperCamelCase											=  self._Node(snake_case	,    snake_case	,    snake_case			)
          __UpperCamelCase											=  self._trailer
          __UpperCamelCase											=  self._header
          __UpperCamelCase											=  0







      def __len__(       self   :	int			):
          return self._size







      def  snake_case		(       self   :	Any			):
          return self.__len__() == 0







      def  snake_case		(       self   :	Dict	,    snake_case   :	Any	,    snake_case   :	int	,    snake_case   :	List[Any]			):
          # Create new_node by setting it's prev.link -> header
          # setting it's next.link -> trailer
          __UpperCamelCase											=  self._Node(snake_case	,    snake_case	,    snake_case			)
          __UpperCamelCase											=  new_node
          __UpperCamelCase											=  new_node
          self._size += 1
          return self







      def  snake_case		(       self   :	Dict	,    snake_case   :	List[Any]			):
          __UpperCamelCase											=  node._prev
          __UpperCamelCase											=  node._next

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







class 	_lowerCamelCase  (     _DoublyLinkedBase				):

      """simple docstring"""

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







      def  snake_case		(       self   :	Optional[int]			):
          if self.is_empty():
              raise Exception('''List is empty'''			)
          return self._trailer._prev._data







      def  snake_case		(       self   :	Dict	,    snake_case   :	Any			):
          return self._insert(self._header	,    snake_case	,    self._header._next			)







      def  snake_case		(       self   :	Any	,    snake_case   :	Dict			):
          return self._insert(self._trailer._prev	,    snake_case	,    self._trailer			)







      def  snake_case		(       self   :	List[str]			):
          if self.is_empty():
              raise IndexError('''remove_first from empty list'''			)
          return self._delete(self._header._next			)







      def  snake_case		(       self   :	Optional[Any]			):
          if self.is_empty():
              raise IndexError('''remove_first from empty list'''			)
          return self._delete(self._trailer._prev			)












def    __SCREAMING_SNAKE_CASE				(					lowercase_ )    ->		int:

    """simple docstring"""


    if not isinstance(lowercase_   ,       lowercase_ ):
        raise TypeError('''recursive_lucas_number accepts only integer arguments.''' )
    if n_th_number == 0:
        return 2
    if n_th_number == 1:
        return 1

    return recursive_lucas_number(n_th_number - 1 ) + recursive_lucas_number(
        n_th_number - 2 )




def    __SCREAMING_SNAKE_CASE				(					lowercase_ )    ->		int:

    """simple docstring"""


    if not isinstance(lowercase_   ,       lowercase_ ):
        raise TypeError('''dynamic_lucas_number accepts only integer arguments.''' )
    __UpperCamelCase						, __UpperCamelCase											=  2, 1
    for _ in range(lowercase_ ):
        __UpperCamelCase						, __UpperCamelCase											=  b, a + b
    return a


if __name__ == "__main__":
 from doctest import testmod

 testmod()
 a_										=       int(input("Enter the number of terms in lucas series:\n").strip())
 print("Using recursive function to calculate lucas series:")
 print(" ".join(str(recursive_lucas_number(i)) for i in range(n)))
 print("\nUsing dynamic function to calculate lucas series:")
 print(" ".join(str(dynamic_lucas_number(i)) for i in range(n)))






