



"""simple docstring"""







def 	lowerCAmelCase__      (  lowerCamelCase__      )			->				Dict:
							if not isinstance(lowerCamelCase__					,   lowerCamelCase__      ):
														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 	lowerCAmelCase__      (  lowerCamelCase__      )			->				Tuple:
							if not isinstance(lowerCamelCase__					,   lowerCamelCase__      ):
														raise TypeError('dynamic_lucas_number accepts only integer arguments.'      )
							A    =       2, 1
							for _ in range(lowerCamelCase__      ):
														A    =       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)))











from __future__ import annotations

from typing import Any
class 							__snake_case:



 def __init__(						self : str			,		UpperCAmelCase__ : Any			,		UpperCAmelCase__ : Any						):  # noqa: A002

    """simple docstring"""






    lowercase__    :						Optional[int]       =			item
    lowercase__    :						Union[str, Any]       =			next
class 							__snake_case:



 def __init__(						self : List[Any]						):

    """simple docstring"""






    lowercase__    :						Node | None       =			None
    lowercase__    :						Optional[Any]       =			0



 def     UpperCAmelCase     (						self : List[Any]			,		UpperCAmelCase__ : Any						):

    """simple docstring"""






    lowercase__    :						Any       =			Node(UpperCAmelCase__			,		self.head						)
    self.size += 1



 def     UpperCAmelCase     (						self : Dict						):

    """simple docstring"""






    if self.head is None:
       return None
    else:
       lowercase__    :						List[Any]       =			self.head.item
       lowercase__    :						Optional[Any]       =			self.head.next
       self.size -= 1
       return item



 def     UpperCAmelCase     (						self : Union[str, Any]						):

    """simple docstring"""






    return self.head is None



 def __str__(						self : List[str]						):

    """simple docstring"""






    if self.is_empty():
       return ""
    else:
       lowercase__    :						Optional[Any]       =			self.head
       lowercase__    :						str       =			""""""
       lowercase__    :						list[str]       =			[]
       while iterate:
          item_list.append(str(iterate.item						)						)
          lowercase__    :						List[str]       =			iterate.next

       lowercase__    :						List[str]       =			""" --> """.join(UpperCAmelCase__						)

       return item_str







 def __len__(						self : List[Any]						):

    """simple docstring"""






    return self.size


