





from __future__ import annotations

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

_UpperCAmelCase       : Union[str, Any]			     =       (3, 9, -11, 0, 7, 5, 1, -1)
_UpperCAmelCase       : Union[str, Any]			     =       (4, 6, 2, 0, 8, 10, 3, -2)

@dataclass
class      lowerCAmelCase							:
 UpperCAmelCase__									=	42
 UpperCAmelCase__									=	42


class      lowerCAmelCase							:
 def __init__(   self						:   Any    ,  UpperCAmelCase						:   Iterable[int]			)    ->			None:
     lowerCamelCase__					:   Node | None      				=	None
     for i in sorted(UpperCAmelCase    ,  reverse=UpperCAmelCase			):
         lowerCamelCase__					:   Tuple      				=	Node(UpperCAmelCase    ,  self.head			)
 def __iter__(   self						:   Optional[int]			)    ->			Iterator[int]:
     lowerCamelCase__					:   str      				=	self.head
     while node:
         yield node.data
         lowerCamelCase__					:   List[str]      				=	node.next_node
 def __len__(   self						:   List[str]			)    ->			int:
     return sum(1 for _ in self			)







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


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  SortedLinkedList:
    return SortedLinkedList(list(_UpperCAmelCase				) + list(_UpperCAmelCase				)				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    _UpperCAmelCase       : Optional[Any]			     =       SortedLinkedList
    print(merge_lists(SSL(test_data_odd), SSL(test_data_even)))












_UpperCAmelCase       : List[Any]			     =       {
    """meter""": """m""",
    """kilometer""": """km""",
    """megametre""": """Mm""",
    """gigametre""": """Gm""",
    """terametre""": """Tm""",
    """petametre""": """Pm""",
    """exametre""": """Em""",
    """zettametre""": """Zm""",
    """yottametre""": """Ym""",
}
# Exponent of the factor(meter)
_UpperCAmelCase       : Dict			     =       {
    """m""": 0,
    """km""": 3,
    """Mm""": 6,
    """Gm""": 9,
    """Tm""": 12,
    """Pm""": 15,
    """Em""": 18,
    """Zm""": 21,
    """Ym""": 24,
}


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase				)    ->  float:
    lowerCamelCase__					:   Dict      				=	from_type.lower().strip('s'				)
    lowerCamelCase__					:   Dict      				=	to_type.lower().strip('s'				)

    lowerCamelCase__					:   Dict      				=	UNIT_SYMBOL.get(_UpperCAmelCase		,			_UpperCAmelCase				)
    lowerCamelCase__					:   str      				=	UNIT_SYMBOL.get(_UpperCAmelCase		,			_UpperCAmelCase				)

    if from_sanitized not in METRIC_CONVERSION:
        lowerCamelCase__					:   List[Any]      				=	(
            F"""Invalid 'from_type' value: {from_type!r}.\n"""
            F"""Conversion abbreviations are: {", ".join(_UpperCAmelCase				)}"""
        )
        raise ValueError(_UpperCAmelCase				)
    if to_sanitized not in METRIC_CONVERSION:
        lowerCamelCase__					:   Optional[Any]      				=	(
            F"""Invalid 'to_type' value: {to_type!r}.\n"""
            F"""Conversion abbreviations are: {", ".join(_UpperCAmelCase				)}"""
        )
        raise ValueError(_UpperCAmelCase				)
    lowerCamelCase__					:   Any      				=	METRIC_CONVERSION[from_sanitized]
    lowerCamelCase__					:   Optional[int]      				=	METRIC_CONVERSION[to_sanitized]
    lowerCamelCase__					:   List[str]      				=	1

    if from_exponent > to_exponent:
        lowerCamelCase__					:   Dict      				=	from_exponent - to_exponent
    else:
        lowerCamelCase__					:   Dict      				=	-(to_exponent - from_exponent)

    return value * pow(10		,			_UpperCAmelCase				)


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

    testmod()





