





from __future__ import annotations

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

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



@dataclass
class     _UpperCAmelCase   :

  """simple docstring"""


  a_      =			42
  a_      =			42





class     _UpperCAmelCase   :

  """simple docstring"""


  def __init__(    self			:		List[Any] ,  lowerCAmelCase_			:		Iterable[int]					)							->						None:
     __lowerCAmelCase							     =     None
     for i in sorted(lowerCAmelCase_ ,  reverse=lowerCAmelCase_					):
        __lowerCAmelCase							     =     Node(lowerCAmelCase_ ,  self.head					)






  def __iter__(    self			:		Union[str, Any]					)							->						Iterator[int]:
     __lowerCAmelCase							     =     self.head
     while node:
        yield node.data
        __lowerCAmelCase							     =     node.next_node






  def __len__(    self			:		Any					)							->						int:
     return sum(1 for _ in self					)






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





def   a_   (			lowerCAmelCase_				:      SortedLinkedList,     lowerCAmelCase_				:      SortedLinkedList     ):
   return SortedLinkedList(list(lowerCAmelCase_     ) + list(lowerCAmelCase_     )     )


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     _snake_case  :   Dict						   =  SortedLinkedList
     print(merge_lists(SSL(test_data_odd), SSL(test_data_even)))








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

def   a_   (			lowerCAmelCase_				:      float,     lowerCAmelCase_				:      str,     lowerCAmelCase_				:      str     ):
   __lowerCAmelCase							     =     from_type.lower().strip('s'     )
   __lowerCAmelCase							     =     to_type.lower().strip('s'     )

   __lowerCAmelCase							     =     UNIT_SYMBOL.get(lowerCAmelCase_,     lowerCAmelCase_     )
   __lowerCAmelCase							     =     UNIT_SYMBOL.get(lowerCAmelCase_,     lowerCAmelCase_     )

   if from_sanitized not in METRIC_CONVERSION:
      __lowerCAmelCase							     =     (
          F"""Invalid 'from_type' value: {from_type!r}.\n"""
          F"""Conversion abbreviations are: {", ".join(lowerCAmelCase_     )}"""
      )
      raise ValueError(lowerCAmelCase_     )
   if to_sanitized not in METRIC_CONVERSION:
      __lowerCAmelCase							     =     (
          F"""Invalid 'to_type' value: {to_type!r}.\n"""
          F"""Conversion abbreviations are: {", ".join(lowerCAmelCase_     )}"""
      )
      raise ValueError(lowerCAmelCase_     )
   __lowerCAmelCase							     =     METRIC_CONVERSION[from_sanitized]
   __lowerCAmelCase							     =     METRIC_CONVERSION[to_sanitized]
   __lowerCAmelCase							     =     1

   if from_exponent > to_exponent:
      __lowerCAmelCase							     =     from_exponent - to_exponent
   else:
      __lowerCAmelCase							     =     -(to_exponent - from_exponent)

   return value * pow(10,     lowerCAmelCase_     )


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

     testmod()

