
'''simple docstring'''






def 		A_       (	_lowerCAmelCase   :    int				,	_lowerCAmelCase   :    int							):



      """simple docstring"""




      while a != 0:
            _lowerCamelCase				:   Union[str, Any]								=   b % a, a
      return b







def 		A_       (	_lowerCAmelCase   :    int				,	_lowerCAmelCase   :    int							):



      """simple docstring"""




      if gcd(_lowerCAmelCase				,	_lowerCAmelCase							) != 1:
            _lowerCamelCase				:   List[Any]								=   F'mod inverse of {a!r} and {m!r} does not exist'
            raise ValueError(_lowerCAmelCase							)
      _lowerCamelCase				:   Optional[Any]								=   1, 0, a
      _lowerCamelCase				:   Optional[int]								=   0, 1, m
      while va != 0:
            _lowerCamelCase				:   str								=   ua // va
            _lowerCamelCase				:   Dict								=   (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
      return ua % m







'''simple docstring'''






from __future__ import annotations

from collections.abc import Iterable, Iterator
from dataclasses import dataclass

UpperCAmelCase_       :   str   =       (3, 9, -11, 0, 7, 5, 1, -1)
UpperCAmelCase_       :   int   =       (4, 6, 2, 0, 8, 10, 3, -2)

@dataclass
class  UpperCAmelCase__						:
    lowerCAmelCase_				    =		42
    lowerCAmelCase_				    =		42


class  UpperCAmelCase__						:



    def __init__(	self      :       Optional[int],__A      :       Iterable[int]     ):
          _lowerCamelCase				:   Node | None								=   None
          for i in sorted(__A,reverse=__A     ):
                _lowerCamelCase				:   Dict								=   Node(__A,self.head     )



    def __iter__(	self      :       str     ):
          _lowerCamelCase				:   Dict								=   self.head
          while node:
                yield node.data
                _lowerCamelCase				:   Optional[Any]								=   node.next_node



    def __len__(	self      :       str     ):
          return sum(1 for _ in self     )



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







def 		A_       (	_lowerCAmelCase   :    SortedLinkedList				,	_lowerCAmelCase   :    SortedLinkedList							):



      """simple docstring"""




      return SortedLinkedList(list(_lowerCAmelCase							) + list(_lowerCAmelCase							)							)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 UpperCAmelCase_       :   List[str]   =       SortedLinkedList
 print(merge_lists(SSL(test_data_odd), SSL(test_data_even)))