


__a     =			{
    'meter': 'm',
    'kilometer': 'km',
    'megametre': 'Mm',
    'gigametre': 'Gm',
    'terametre': 'Tm',
    'petametre': 'Pm',
    'exametre': 'Em',
    'zettametre': 'Zm',
    'yottametre': 'Ym',
}
# Exponent of the factor(meter)
__a     =			{
    'm': 0,
    'km': 3,
    'Mm': 6,
    'Gm': 9,
    'Tm': 12,
    'Pm': 15,
    'Em': 18,
    'Zm': 21,
    'Ym': 24,
}
def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_   )						->float:
   UpperCAmelCase							=     from_type.lower().strip("""s"""   )
   UpperCAmelCase							=     to_type.lower().strip("""s"""   )

   UpperCAmelCase							=     UNIT_SYMBOL.get(_SCREAMING_SNAKE_CASE  ,						_SCREAMING_SNAKE_CASE   )
   UpperCAmelCase							=     UNIT_SYMBOL.get(_SCREAMING_SNAKE_CASE  ,						_SCREAMING_SNAKE_CASE   )

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

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

   return value * pow(1_0  ,						_SCREAMING_SNAKE_CASE   )


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

      testmod()







from __future__ import annotations
def   _UpperCamelCase				(						lowerCAmelCase_   )						->None:
   create_state_space_tree(lowerCAmelCase_  ,						[]  ,						0  ,						[0 for i in range(len(lowerCAmelCase_   )   )]   )
def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						)						->None:

   if index == len(lowerCAmelCase_   ):
      print(lowerCAmelCase_   )
      return

   for i in range(len(lowerCAmelCase_   )   ):
      if not index_used[i]:
         current_sequence.append(sequence[i]   )
         UpperCAmelCase							=     True
         create_state_space_tree(lowerCAmelCase_  ,						lowerCAmelCase_  ,						index + 1  ,						lowerCAmelCase_   )
         current_sequence.pop()
         UpperCAmelCase							=     False
__a     =			[3, 1, 2, 4]
generate_all_permutations(sequence)

__a     =			["A", "B", "C"]







generate_all_permutations(sequence_a)



