



'''simple docstring'''



from collections import namedtuple

lowerCAmelCase						:		Dict						      = namedtuple('''from_to''', '''from_ to''')

lowerCAmelCase						:		int						      = {
    '''millimeter''': '''mm''',
    '''centimeter''': '''cm''',
    '''meter''': '''m''',
    '''kilometer''': '''km''',
    '''inch''': '''in''',
    '''inche''': '''in''',  # Trailing 's' has been stripped off
    '''feet''': '''ft''',
    '''foot''': '''ft''',
    '''yard''': '''yd''',
    '''mile''': '''mi''',
}

lowerCAmelCase						:		Optional[Any]						      = {
    '''mm''': from_to(0.001, 1_0_0_0),
    '''cm''': from_to(0.01, 1_0_0),
    '''m''': from_to(1, 1),
    '''km''': from_to(1_0_0_0, 0.001),
    '''in''': from_to(0.0254, 39.3701),
    '''ft''': from_to(0.3048, 3.28084),
    '''yd''': from_to(0.9144, 1.09361),
    '''mi''': from_to(1609.34, 0.000621371),
}



def 	__lowerCAmelCase       (				lowerCamelCase :    float					,		lowerCamelCase :    str					,		lowerCamelCase :    str       ):






	'''simple docstring'''




	__lowerCAmelCase       				=	from_type.lower().rstrip("s"       )
	__lowerCAmelCase       				=	TYPE_CONVERSION.get(lowerCamelCase					,		lowerCamelCase       )
	__lowerCAmelCase       				=	to_type.lower().rstrip("s"       )
	__lowerCAmelCase       				=	TYPE_CONVERSION.get(lowerCamelCase					,		lowerCamelCase       )
	if new_from not in METRIC_CONVERSION:
		__lowerCAmelCase       				=	(
		    f'''Invalid \'from_type\' value: {from_type!r}.\n'''
		    f'''Conversion abbreviations are: {', '.join(lowerCamelCase       )}'''
		)
		raise ValueError(lowerCamelCase       )
	if new_to not in METRIC_CONVERSION:
		__lowerCAmelCase       				=	(
		    f'''Invalid \'to_type\' value: {to_type!r}.\n'''
		    f'''Conversion abbreviations are: {', '.join(lowerCamelCase       )}'''
		)
		raise ValueError(lowerCamelCase       )
	return value * METRIC_CONVERSION[new_from].from_ * METRIC_CONVERSION[new_to].to


if __name__ == "__main__":
	import doctest

	doctest.testmod()




'''simple docstring'''



import math



def 	__lowerCAmelCase       (				lowerCamelCase :    int       ):






	'''simple docstring'''




	if not isinstance(lowerCamelCase					,		lowerCamelCase       ):
		__lowerCAmelCase       				=	f'''Input value of [number={number}] must be an integer'''
		raise TypeError(lowerCamelCase       )
	if number < 1:
		__lowerCAmelCase       				=	f'''Input value of [number={number}] must be a positive integer'''
		raise ValueError(lowerCamelCase       )
	__lowerCAmelCase       				=	[number]
	while number != 1:
		if number % 2 == 0:
			__lowerCAmelCase       				=	math.floor(math.sqrt(lowerCamelCase       )       )
		else:
			__lowerCAmelCase       				=	math.floor(
			    math.sqrt(lowerCamelCase       ) * math.sqrt(lowerCamelCase       ) * math.sqrt(lowerCamelCase       )       )
		sequence.append(lowerCamelCase       )
	return sequence


if __name__ == "__main__":
	import doctest

	doctest.testmod()