"""simple docstring"""




_a      :		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)
_a      :		Optional[Any]           =   {
    'm': 0,
    'km': 3,
    'Mm': 6,
    'Gm': 9,
    'Tm': 12,
    'Pm': 15,
    'Em': 18,
    'Zm': 21,
    'Ym': 24,
}





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       float			,_lowerCamelCase						:       str			,_lowerCamelCase						:       str	)       ->      float:
  _lowerCAmelCase						:       Tuple  			=     from_type.lower().strip("""s"""	)
  _lowerCAmelCase						:       str  			=     to_type.lower().strip("""s"""	)

  _lowerCAmelCase						:       int  			=     UNIT_SYMBOL.get(_lowerCamelCase			,_lowerCamelCase	)
  _lowerCAmelCase						:       Any  			=     UNIT_SYMBOL.get(_lowerCamelCase			,_lowerCamelCase	)

  if from_sanitized not in METRIC_CONVERSION:
    _lowerCAmelCase						:       Optional[int]  			=     (
        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						:       int  			=     (
        f"Invalid 'to_type' value: {to_type!r}.\n"
        f"Conversion abbreviations are: {', '.join(_lowerCamelCase	)}"
    )
    raise ValueError(_lowerCamelCase	)
  _lowerCAmelCase						:       Tuple  			=     METRIC_CONVERSION[from_sanitized]
  _lowerCAmelCase						:       Optional[int]  			=     METRIC_CONVERSION[to_sanitized]
  _lowerCAmelCase						:       List[str]  			=     1

  if from_exponent > to_exponent:
    _lowerCAmelCase						:       str  			=     from_exponent - to_exponent
  else:
    _lowerCAmelCase						:       Dict  			=     -(to_exponent - from_exponent)

  return value * pow(10			,_lowerCamelCase	)


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

     testmod()












class  UpperCamelCase_      :



	'''simple docstring'''




	def __init__(       self       ,			a					)       ->    None:
								snake_case_				=							set_counts
								snake_case_				=							max(a					)
								snake_case_				=							len(a					)
								snake_case_				=							[1] * num_sets
								snake_case_				=							list(range(a					)					)




	def 							_UpperCamelCase			(       self       ,			a       ,			a					)       ->    bool:
								snake_case_				=							self.get_parent(a					)
								snake_case_				=							self.get_parent(a					)

								if src_parent == dst_parent:
															return False

								if self.ranks[dst_parent] >= self.ranks[src_parent]:
															self.set_counts[dst_parent] += self.set_counts[src_parent]
															snake_case_				=							0
															snake_case_				=							dst_parent
															if self.ranks[dst_parent] == self.ranks[src_parent]:
																						self.ranks[dst_parent] += 1
															snake_case_				=							self.set_counts[dst_parent]
								else:
															self.set_counts[src_parent] += self.set_counts[dst_parent]
															snake_case_				=							0
															snake_case_				=							src_parent
															snake_case_				=							self.set_counts[src_parent]

								snake_case_				=							max(self.max_set       ,			a					)
								return True






	def 							_UpperCamelCase			(       self       ,			a					)       ->    int:
								if self.parents[disj_set] == disj_set:
															return disj_set
								snake_case_				=							self.get_parent(self.parents[disj_set]					)
								return self.parents[disj_set]





