'''simple docstring'''

class 				_lowercase     :


 '''simple docstring'''






 def __init__(      self   :	Optional[int]      ,       SCREAMING_SNAKE_CASE__   :	Any      ,       SCREAMING_SNAKE_CASE__   :	str=None      ,       SCREAMING_SNAKE_CASE__   :	Dict=None							)  ->    Tuple:
  __lowerCAmelCase											=						data
  __lowerCAmelCase											=						previous
  __lowerCAmelCase											=						next_node
 def __str__(      self   :	Tuple							)  ->    str:
  return f"""{self.data}"""
 def a					(      self   :	Any							)  ->    int:
  return self.data
 def a					(      self   :	Optional[int]							)  ->    Dict:
  return self.next





 def a					(      self   :	str							)  ->    Optional[int]:
  return self.previous







class 				_lowercase     :


 '''simple docstring'''






 def __init__(      self   :	Dict      ,       SCREAMING_SNAKE_CASE__   :	List[Any]							)  ->    Dict:
  __lowerCAmelCase											=						head
 def __iter__(      self   :	Union[str, Any]							)  ->    List[str]:
  return self





 def a					(      self   :	List[Any]							)  ->    Any:
  if not self.current:
   raise StopIteration
  else:
   __lowerCAmelCase											=						self.current.get_data()
   __lowerCAmelCase											=						self.current.get_next()
   return value







class 				_lowercase     :


 '''simple docstring'''






 def __init__(      self   :	int							)  ->    str:
  __lowerCAmelCase											=						None  # First node in list
  __lowerCAmelCase											=						None  # Last node in list
 def __str__(      self   :	str							)  ->    Union[str, Any]:
  __lowerCAmelCase											=						self.head
  __lowerCAmelCase											=						[]
  while current is not None:
   nodes.append(current.get_data()							)
   __lowerCAmelCase											=						current.get_next()
  return " ".join(str(UpperCamelCase__							) for node in nodes							)
 def __contains__(      self   :	int      ,       SCREAMING_SNAKE_CASE__   :	Tuple							)  ->    str:
  __lowerCAmelCase											=						self.head
  while current:
   if current.get_data() == value:
    return True
   __lowerCAmelCase											=						current.get_next()
  return False
 def __iter__(      self   :	Optional[Any]							)  ->    Tuple:
  return LinkedListIterator(self.head							)
 def a					(      self   :	Union[str, Any]							)  ->    str:
  if self.head:
   return self.head.get_data()
  return None
 def a					(      self   :	Dict							)  ->    Optional[Any]:
  if self.tail:
   return self.tail.get_data()
  return None
 def a					(      self   :	Union[str, Any]      ,       SCREAMING_SNAKE_CASE__   :	List[str]							)  ->    None:
  if self.head is None:
   __lowerCAmelCase											=						node
   __lowerCAmelCase											=						node
  else:
   self.insert_before_node(self.head      ,       UpperCamelCase__							)
 def a					(      self   :	Optional[int]      ,       SCREAMING_SNAKE_CASE__   :	Any							)  ->    None:
  if self.head is None:
   self.set_head(UpperCamelCase__							)
  else:
   self.insert_after_node(self.tail      ,       UpperCamelCase__							)
 def a					(      self   :	Union[str, Any]      ,       SCREAMING_SNAKE_CASE__   :	Dict							)  ->    None:
  __lowerCAmelCase											=						Node(UpperCamelCase__							)
  if self.head is None:
   self.set_head(UpperCamelCase__							)
  else:
   self.set_tail(UpperCamelCase__							)
 def a					(      self   :	int      ,       SCREAMING_SNAKE_CASE__   :	List[Any]      ,       SCREAMING_SNAKE_CASE__   :	Tuple							)  ->    None:
  __lowerCAmelCase											=						node
  __lowerCAmelCase											=						node.previous

  if node.get_previous() is None:
   __lowerCAmelCase											=						node_to_insert
  else:
   __lowerCAmelCase											=						node_to_insert

  __lowerCAmelCase											=						node_to_insert
 def a					(      self   :	List[str]      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]      ,       SCREAMING_SNAKE_CASE__   :	Dict							)  ->    None:
  __lowerCAmelCase											=						node
  __lowerCAmelCase											=						node.next

  if node.get_next() is None:
   __lowerCAmelCase											=						node_to_insert
  else:
   __lowerCAmelCase											=						node_to_insert

  __lowerCAmelCase											=						node_to_insert
 def a					(      self   :	Any      ,       SCREAMING_SNAKE_CASE__   :	int      ,       SCREAMING_SNAKE_CASE__   :	Any							)  ->    None:
  __lowerCAmelCase											=						1
  __lowerCAmelCase											=						Node(UpperCamelCase__							)
  __lowerCAmelCase											=						self.head
  while node:
   if current_position == position:
    self.insert_before_node(UpperCamelCase__      ,       UpperCamelCase__							)
    return
   current_position += 1
   __lowerCAmelCase											=						node.next
  self.insert_after_node(self.tail      ,       UpperCamelCase__							)
 def a					(      self   :	Tuple      ,       SCREAMING_SNAKE_CASE__   :	str							)  ->    Node:
  __lowerCAmelCase											=						self.head
  while node:
   if node.get_data() == item:
    return node
   __lowerCAmelCase											=						node.get_next()
  raise Exception("""Node not found"""							)
 def a					(      self   :	Dict      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]							)  ->    str:
  if (node := self.get_node(UpperCamelCase__							)) is not None:
   if node == self.head:
    __lowerCAmelCase											=						self.head.get_next()

   if node == self.tail:
    __lowerCAmelCase											=						self.tail.get_previous()

   self.remove_node_pointers(UpperCamelCase__							)
 @staticmethod
 def a					(      SCREAMING_SNAKE_CASE__   :	Tuple							)  ->    None:
  if node.get_next():
   __lowerCAmelCase											=						node.previous

  if node.get_previous():
   __lowerCAmelCase											=						node.next

  __lowerCAmelCase											=						None
  __lowerCAmelCase											=						None





 def a					(      self   :	Optional[int]							)  ->    Tuple:
  return self.head is None







def      UpperCamelCase_						(					)					->     None:






 '''simple docstring'''

 pass


if __name__ == "__main__":
 import doctest

 doctest.testmod()












def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )	-> int:
       return x if y == 0 else greatest_common_divisor(_SCREAMING_SNAKE_CASE ,x % y    )

def      A      (      _SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )	-> int:
       return (x * y) // greatest_common_divisor(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )

def      A      (      _SCREAMING_SNAKE_CASE = 20    )	-> int:
       lowerCamelCase   :      List[Any]			 =					1
       for i in range(1 ,n + 1    ):
              lowerCamelCase   :      List[str]			 =					lcm(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE    )
       return g


if __name__ == "__main__":
       print(f'''{solution() = }''')






