


'''simple docstring'''

class 						__SCREAMING_SNAKE_CASE					:






     def __init__(			self     ,							__UpperCamelCase     ,							__UpperCamelCase=None     ,							__UpperCamelCase=None		)       ->    List[Any]:
          _a						=		data
          _a						=		previous
          _a						=		next_node






     def __str__(			self		)       ->    str:
          return f"{self.data}"






     def  a_					(			self		)       ->    int:
          return self.data






     def  a_					(			self		)       ->    List[str]:
          return self.next






     def  a_					(			self		)       ->    Any:
          return self.previous







class 						__SCREAMING_SNAKE_CASE					:






     def __init__(			self     ,							__UpperCamelCase		)       ->    Union[str, Any]:
          _a						=		head






     def __iter__(			self		)       ->    Optional[Any]:
          return self






     def  a_					(			self		)       ->    Optional[int]:
          if not self.current:
               raise StopIteration
          else:
               _a						=		self.current.get_data()
               _a						=		self.current.get_next()
               return value







class 						__SCREAMING_SNAKE_CASE					:






     def __init__(			self		)       ->    List[Any]:
          _a						=		None  # First node in list
          _a						=		None  # Last node in list






     def __str__(			self		)       ->    str:
          _a						=		self.head
          _a						=		[]
          while current is not None:
               nodes.append(current.get_data()		)
               _a						=		current.get_next()
          return " ".join(str(__UpperCamelCase		) for node in nodes		)






     def __contains__(			self     ,							__UpperCamelCase		)       ->    Tuple:
          _a						=		self.head
          while current:
               if current.get_data() == value:
                    return True
               _a						=		current.get_next()
          return False






     def __iter__(			self		)       ->    Optional[int]:
          return LinkedListIterator(self.head		)






     def  a_					(			self		)       ->    Optional[Any]:
          if self.head:
               return self.head.get_data()
          return None






     def  a_					(			self		)       ->    int:
          if self.tail:
               return self.tail.get_data()
          return None






     def  a_					(			self     ,							__UpperCamelCase		)       ->    None:
          if self.head is None:
               _a						=		node
               _a						=		node
          else:
               self.insert_before_node(self.head     ,							__UpperCamelCase		)






     def  a_					(			self     ,							__UpperCamelCase		)       ->    None:
          if self.head is None:
               self.set_head(__UpperCamelCase		)
          else:
               self.insert_after_node(self.tail     ,							__UpperCamelCase		)






     def  a_					(			self     ,							__UpperCamelCase		)       ->    None:
          _a						=		Node(__UpperCamelCase		)
          if self.head is None:
               self.set_head(__UpperCamelCase		)
          else:
               self.set_tail(__UpperCamelCase		)






     def  a_					(			self     ,							__UpperCamelCase     ,							__UpperCamelCase		)       ->    None:
          _a						=		node
          _a						=		node.previous

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

          _a						=		node_to_insert






     def  a_					(			self     ,							__UpperCamelCase     ,							__UpperCamelCase		)       ->    None:
          _a						=		node
          _a						=		node.next

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

          _a						=		node_to_insert






     def  a_					(			self     ,							__UpperCamelCase     ,							__UpperCamelCase		)       ->    None:
          _a						=		1
          _a						=		Node(__UpperCamelCase		)
          _a						=		self.head
          while node:
               if current_position == position:
                    self.insert_before_node(__UpperCamelCase     ,							__UpperCamelCase		)
                    return
               current_position += 1
               _a						=		node.next
          self.insert_after_node(self.tail     ,							__UpperCamelCase		)






     def  a_					(			self     ,							__UpperCamelCase		)       ->    Node:
          _a						=		self.head
          while node:
               if node.get_data() == item:
                    return node
               _a						=		node.get_next()
          raise Exception("Node not found"		)






     def  a_					(			self     ,							__UpperCamelCase		)       ->    Optional[int]:
          if (node := self.get_node(__UpperCamelCase		)) is not None:
               if node == self.head:
                    _a						=		self.head.get_next()

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

               self.remove_node_pointers(__UpperCamelCase		)






     @staticmethod
     def  a_					(			__UpperCamelCase		)       ->    None:
          if node.get_next():
               _a						=		node.previous

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

          _a						=		None
          _a						=		None






     def  a_					(			self		)       ->    str:
          return self.head is None







def __UpperCamelCase   (			)      ->     None:







     '''simple docstring'''














if __name__ == "__main__":
   import doctest

   doctest.testmod()









'''simple docstring'''

lowercase__				     =		65_521






def __UpperCamelCase   (			__lowerCamelCase		: str				)      ->     int:







     '''simple docstring'''






     _a						=		1
     _a						=		0
     for plain_chr in plain_text:
          _a						=		(a + ord(__lowerCamelCase				)) % MOD_ADLER
          _a						=		(b + a) % MOD_ADLER
     return (b << 16) | a

