





from collections import namedtuple

_SCREAMING_SNAKE_CASE   						=		namedtuple("""from_to""", """from_ to""")

_SCREAMING_SNAKE_CASE   						=		{
    """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""",
}

_SCREAMING_SNAKE_CASE   						=		{
    """mm""": from_to(0.0_0_1, 10_00),
    """cm""": from_to(0.0_1, 1_00),
    """m""": from_to(1, 1),
    """km""": from_to(10_00, 0.0_0_1),
    """in""": from_to(0.0_2_5_4, 3_9.3_7_0_1),
    """ft""": from_to(0.3_0_4_8, 3.2_8_0_8_4),
    """yd""": from_to(0.9_1_4_4, 1.0_9_3_6_1),
    """mi""": from_to(1_6_0_9.3_4, 0.0_0_0_6_2_1_3_7_1),
}


def 				SCREAMING_SNAKE_CASE__    (     __a ,			__a ,			__a ):
	snake_case_		:      List[Any]           =						from_type.lower().rstrip('s' )
	snake_case_		:      Optional[Any]           =						TYPE_CONVERSION.get(__a ,			__a )
	snake_case_		:      Dict           =						to_type.lower().rstrip('s' )
	snake_case_		:      Union[str, Any]           =						TYPE_CONVERSION.get(__a ,			__a )
	if new_from not in METRIC_CONVERSION:
		snake_case_		:      str           =						(
		    f"""Invalid 'from_type' value: {from_type!r}.\n"""
		    f"""Conversion abbreviations are: {', '.join(__a )}"""
		)
		raise ValueError(__a )
	if new_to not in METRIC_CONVERSION:
		snake_case_		:      str           =						(
		    f"""Invalid 'to_type' value: {to_type!r}.\n"""
		    f"""Conversion abbreviations are: {', '.join(__a )}"""
		)
		raise ValueError(__a )
	return value * METRIC_CONVERSION[new_from].from_ * METRIC_CONVERSION[new_to].to


if __name__ == "__main__":
						import doctest

						doctest.testmod()







"""simple docstring"""

from __future__ import annotations

def 		lowercase_   (		_UpperCAmelCase	,   _UpperCAmelCase	,   _UpperCAmelCase						):




	"""simple docstring"""






	assert (
	    c % greatest_common_divisor(_UpperCAmelCase	,   _UpperCAmelCase						) == 0
	)  # greatest_common_divisor(a,b) function implemented below
	((A_) ,			(A_) ,			(A_))	:					List[Any]						 =		extended_gcd(_UpperCAmelCase	,   _UpperCAmelCase						)  # extended_gcd(a,b) function implemented below
	A_	:					int						 =		c / d
	return (r * x, r * y)

def 		lowercase_   (		_UpperCAmelCase	,   _UpperCAmelCase	,   _UpperCAmelCase	,   _UpperCAmelCase = 2						):




	"""simple docstring"""






	((A_) ,			(A_))	:					Any						 =		diophantine(_UpperCAmelCase	,   _UpperCAmelCase	,   _UpperCAmelCase						)  # Initial value
	A_	:					Union[str, Any]						 =		greatest_common_divisor(_UpperCAmelCase	,   _UpperCAmelCase						)
	A_	:					List[str]						 =		a // d
	A_	:					str						 =		b // d

	for i in range(_UpperCAmelCase						):
		A_	:					int						 =		xa + i * q
		A_	:					str						 =		ya - i * p
		print(_UpperCAmelCase	,   _UpperCAmelCase						)

def 		lowercase_   (		_UpperCAmelCase	,   _UpperCAmelCase						):




	"""simple docstring"""






	if a < b:
		A_ ,			A_	:					Tuple						 =		b, a

	while a % b != 0:
		A_ ,			A_	:					int						 =		b, a % b

	return b

def 		lowercase_   (		_UpperCAmelCase	,   _UpperCAmelCase						):




	"""simple docstring"""






	assert a >= 0 and b >= 0

	if b == 0:
		A_ ,			A_ ,			A_	:					str						 =		a, 1, 0
	else:
		((A_) ,			(A_) ,			(A_))	:					List[str]						 =		extended_gcd(_UpperCAmelCase	,   a % b						)
		A_	:					Optional[int]						 =		q
		A_	:					Tuple						 =		p - q * (a // b)

	assert a % d == 0 and b % d == 0
	assert d == a * x + b * y

	return (d, x, y)


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

		testmod(name='diophantine', verbose=True)
		testmod(name='diophantine_all_soln', verbose=True)
		testmod(name='extended_gcd', verbose=True)
		testmod(name='greatest_common_divisor', verbose=True)





