class 						snake_case_ :






   def __init__(   self       :  Dict			,		lowercase_       :  Union[str, Any]						)      ->		int:
       lowercase__				:     str					      =       data
       lowercase__				:     List[str]					      =       None
       lowercase__				:     int					      =       None







   def __str__(   self       :  Optional[int]						)      ->		str:
       return F'''{self.data}'''



class 						snake_case_ :






   def __init__(   self       :  int						)      ->		Optional[Any]:
       lowercase__				:     Optional[int]					      =       None
       lowercase__				:     List[Any]					      =       None






   def __iter__(   self       :  Dict						)      ->		Optional[Any]:
       lowercase__				:     Dict					      =       self.head
       while node:
           yield node.data
           lowercase__				:     Tuple					      =       node.next






   def __str__(   self       :  str						)      ->		str:
       return "->".join([str(lowercase_						) for item in self]						)






   def __len__(   self       :  List[str]						)      ->		Dict:
       return sum(1 for _ in self						)






   def    __UpperCamelCase  (   self       :  Tuple			,		lowercase_       :  int						)      ->		List[Any]:
       self.insert_at_nth(0			,		lowercase_						)






   def    __UpperCamelCase  (   self       :  Tuple			,		lowercase_       :  Dict						)      ->		Dict:
       self.insert_at_nth(len(self						)			,		lowercase_						)






   def    __UpperCamelCase  (   self       :  List[str]			,		lowercase_       :  Tuple			,		lowercase_       :  Union[str, Any]						)      ->		Union[str, Any]:
       lowercase__				:     int					      =       len(self						)

       if not 0 <= index <= length:
           raise IndexError("list index out of range"						)
       lowercase__				:     Union[str, Any]					      =       Node(lowercase_						)
       if self.head is None:
           lowercase__				:     Dict					      =       new_node
       elif index == 0:
           lowercase__				:     Optional[Any]					      =       new_node
           lowercase__				:     Optional[Any]					      =       self.head
           lowercase__				:     Any					      =       new_node
       elif index == length:
           lowercase__				:     Dict					      =       new_node
           lowercase__				:     Dict					      =       self.tail
           lowercase__				:     List[Any]					      =       new_node
       else:
           lowercase__				:     List[str]					      =       self.head
           for _ in range(0			,		lowercase_						):
               lowercase__				:     Union[str, Any]					      =       temp.next
           lowercase__				:     Tuple					      =       new_node
           lowercase__				:     Any					      =       temp.previous
           lowercase__				:     Optional[int]					      =       temp
           lowercase__				:     Optional[Any]					      =       new_node






   def    __UpperCamelCase  (   self       :  Optional[Any]						)      ->		Dict:
       return self.delete_at_nth(0						)






   def    __UpperCamelCase  (   self       :  Any						)      ->		Tuple:
       return self.delete_at_nth(len(self						) - 1						)






   def    __UpperCamelCase  (   self       :  List[str]			,		lowercase_       :  Optional[Any]						)      ->		Dict:
       lowercase__				:     Optional[Any]					      =       len(self						)

       if not 0 <= index <= length - 1:
           raise IndexError("list index out of range"						)
       lowercase__				:     Union[str, Any]					      =       self.head  # default first node
       if length == 1:
           lowercase__				:     Optional[Any]					      =       None
       elif index == 0:
           lowercase__				:     Optional[Any]					      =       self.head.next
           lowercase__				:     Dict					      =       None
       elif index == length - 1:
           lowercase__				:     Dict					      =       self.tail
           lowercase__				:     List[str]					      =       self.tail.previous
           lowercase__				:     Union[str, Any]					      =       None
       else:
           lowercase__				:     Dict					      =       self.head
           for _ in range(0			,		lowercase_						):
               lowercase__				:     Union[str, Any]					      =       temp.next
           lowercase__				:     int					      =       temp
           lowercase__				:     Any					      =       temp.previous
           lowercase__				:     Any					      =       temp.next
       return delete_node.data






   def    __UpperCamelCase  (   self       :  Union[str, Any]			,		lowercase_       :  Optional[int]						)      ->		str:
       lowercase__				:     Optional[int]					      =       self.head

       while current.data != data:  # Find the position to delete
           if current.next:
               lowercase__				:     str					      =       current.next
           else:  # We have reached the end an no value matches
               raise ValueError("No data matching given value"						)

       if current == self.head:
           self.delete_head()

       elif current == self.tail:
           self.delete_tail()

       else:  # Before: 1 <--> 2(current) <--> 3
           lowercase__				:     Union[str, Any]					      =       current.next  # 1 --> 3
           lowercase__				:     Optional[Any]					      =       current.previous  # 1 <--> 3
       return data







   def    __UpperCamelCase  (   self       :  Tuple						)      ->		Tuple:
       return len(self						) == 0



def     lowercase_       (    ):
    lowercase__				:     Optional[Any]					      =       DoublyLinkedList()
    assert linked_list.is_empty() is True
    assert str(_lowerCamelCase) == ""

    try:
        linked_list.delete_head()
        raise AssertionError  # This should not happen.
    except IndexError:
        assert True  # This should happen.

    try:
        linked_list.delete_tail()
        raise AssertionError  # This should not happen.
    except IndexError:
        assert True  # This should happen.

    for i in range(10):
        assert len(_lowerCamelCase) == i
        linked_list.insert_at_nth(_lowerCamelCase	,			i + 1)
    assert str(_lowerCamelCase) == "->".join(str(_lowerCamelCase) for i in range(1	,			11))

    linked_list.insert_at_head(0)
    linked_list.insert_at_tail(11)
    assert str(_lowerCamelCase) == "->".join(str(_lowerCamelCase) for i in range(0	,			12))

    assert linked_list.delete_head() == 0
    assert linked_list.delete_at_nth(9) == 10
    assert linked_list.delete_tail() == 11
    assert len(_lowerCamelCase) == 9
    assert str(_lowerCamelCase) == "->".join(str(_lowerCamelCase) for i in range(1	,			10))


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

      testmod()




def     lowercase_       (    _lowerCamelCase							: str	,			_lowerCamelCase							: Optional[int]):
    if len(str(_lowerCamelCase)) == 1 or len(str(_lowerCamelCase)) == 1:
        return a * b

    lowercase__				:     Tuple					      =       max(len(str(_lowerCamelCase))	,			len(str(_lowerCamelCase)))
    lowercase__				:     Union[str, Any]					      =       ma // 2

    lowercase__      ,     lowercase__				:     Union[str, Any]					      =       divmod(_lowerCamelCase	,			10**ma)
    lowercase__      ,     lowercase__				:     Tuple					      =       divmod(_lowerCamelCase	,			10**ma)

    lowercase__				:     int					      =       karatsuba(_lowerCamelCase	,			_lowerCamelCase)
    lowercase__				:     Dict					      =       karatsuba((aa + aa)	,			(ba + ba))
    lowercase__				:     Optional[int]					      =       karatsuba(_lowerCamelCase	,			_lowerCamelCase)

    return (z * 10 ** (2 * ma)) + ((y - z - x) * 10 ** (ma)) + (x)

def     lowercase_       (    ):
    print(karatsuba(1_5463	,			2_3489))


if __name__ == "__main__":
      main()



