

def  UpperCAmelCase_   (_lowerCAmelCase :		list     ,			_lowerCAmelCase :		int     ,			_lowerCAmelCase :		int		):
			if right <= left:
						return
			__UpperCamelCase    :    Union[str, Any]								=      left
			__UpperCamelCase    :    Union[str, Any]								=      right
			__UpperCamelCase    :    List[Any]								=      sorting[left]
			while i <= b:
						if sorting[i] < pivot:
									__UpperCamelCase							,				__UpperCamelCase    :    Optional[int]								=      sorting[i], sorting[a]
									a += 1
									i += 1
						elif sorting[i] > pivot:
									__UpperCamelCase							,				__UpperCamelCase    :    Dict								=      sorting[i], sorting[b]
									b -= 1
						else:
									i += 1
			quick_sort_apartition(_lowerCAmelCase     ,			_lowerCAmelCase     ,			a - 1		)
			quick_sort_apartition(_lowerCAmelCase     ,			b + 1     ,			_lowerCAmelCase		)







def  UpperCAmelCase_   (_lowerCAmelCase :		list     ,			_lowerCAmelCase :		int     ,			_lowerCAmelCase :		int		):
			if left < right:
						__UpperCamelCase    :    str								=      lomuto_partition(_lowerCAmelCase     ,			_lowerCAmelCase     ,			_lowerCAmelCase		)
						quick_sort_lomuto_partition(_lowerCAmelCase     ,			_lowerCAmelCase     ,			pivot_index - 1		)
						quick_sort_lomuto_partition(_lowerCAmelCase     ,			pivot_index + 1     ,			_lowerCAmelCase		)







def  UpperCAmelCase_   (_lowerCAmelCase :		list     ,			_lowerCAmelCase :		int     ,			_lowerCAmelCase :		int		):
			__UpperCamelCase    :    List[str]								=      sorting[right]
			__UpperCamelCase    :    Optional[int]								=      left
			for i in range(_lowerCAmelCase     ,			_lowerCAmelCase		):
						if sorting[i] < pivot:
									__UpperCamelCase							,				__UpperCamelCase    :    Tuple								=      sorting[i], sorting[store_index]
									store_index += 1
			__UpperCamelCase							,				__UpperCamelCase    :    int								=      sorting[store_index], sorting[right]
			return store_index







def  UpperCAmelCase_   (_lowerCAmelCase :		list		):
			if len(_lowerCAmelCase		) <= 1:
						return sorting
			return (
			    three_way_radix_quicksort([i for i in sorting if i < sorting[0]]		)
			    + [i for i in sorting if i == sorting[0]]
			    + three_way_radix_quicksort([i for i in sorting if i > sorting[0]]		)
			)


if __name__ == "__main__":
					import doctest

					doctest.testmod(verbose=True)

					lowercase     :       int        =       input("Enter numbers separated by a comma:\n").strip()
					lowercase     :       int        =       [int(item) for item in user_input.split(",")]
					quick_sort_apartition(unsorted, 0, len(unsorted) - 1)
					print(unsorted)


lowercase     :       dict[str, float]        =       {
    "kilogram": 1,
    "gram": pow(10, 3),
    "milligram": pow(10, 6),
    "metric-ton": pow(10, -3),
    "long-ton": 0.0009842073,
    "short-ton": 0.0011023122,
    "pound": 2.2046244202,
    "stone": 0.1574731728,
    "ounce": 35.273990723,
    "carrat": 5000,
    "atomic-mass-unit": 6.0_22_13_66_52E26,
}

lowercase     :       dict[str, float]        =       {
    "kilogram": 1,
    "gram": pow(10, -3),
    "milligram": pow(10, -6),
    "metric-ton": pow(10, 3),
    "long-ton": 1016.04608,
    "short-ton": 907.184,
    "pound": 0.453592,
    "stone": 6.35029,
    "ounce": 0.0283495,
    "carrat": 0.0002,
    "atomic-mass-unit": 1.6_60_54_01_99E-27,
}







def  UpperCAmelCase_   (_lowerCAmelCase :		str     ,			_lowerCAmelCase :		str     ,			_lowerCAmelCase :		float		):
			if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
						__UpperCamelCase    :    Dict								=      (
						    F'''Invalid \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
						    F'''Supported values are: {", ".join(_lowerCAmelCase		)}'''
						)
						raise ValueError(_lowerCAmelCase		)
			return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
					import doctest

					doctest.testmod()