

from collections import namedtuple

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

lowerCAmelCase__							=			{
    "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__							=			{
    "mm": from_to(0.0_0_1, 1000),
    "cm": from_to(0.0_1, 100),
    "m": from_to(1, 1),
    "km": from_to(1000, 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   _lowerCAmelCase(						__A ,							__A ,							__A      ):
  UpperCAmelCase          =	from_type.lower().rstrip("s"      )
  UpperCAmelCase          =	TYPE_CONVERSION.get(__A ,							__A      )
  UpperCAmelCase          =	to_type.lower().rstrip("s"      )
  UpperCAmelCase          =	TYPE_CONVERSION.get(__A ,							__A      )
  if new_from not in METRIC_CONVERSION:
    UpperCAmelCase          =	(
        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:
    UpperCAmelCase          =	(
        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()








from __future__ import annotations





def     __lowerCamelCase							(   __magic_name__						:	int    ):
							for r in range(1  ,			__magic_name__    ):
														a__:							List[str]									=[]
														for x in range(n - 1    ):
																					a__:							int									=pow(__magic_name__  ,			__magic_name__  ,			__magic_name__    )
																					if val in li:
																												break
																					li.append(__magic_name__    )
														else:
																					return r
							return None


if __name__ == "__main__":
		__UpperCAmelCase    	=  int(input('''Enter a prime number q: '''))
		__UpperCAmelCase    	=  find_primitive(q)
		if a is None:
				print(f"""Cannot find the primitive for the value: {a!r}""")
		else:
				__UpperCAmelCase    	=  int(input('''Enter private key of A: '''))
				__UpperCAmelCase    	=  pow(a, a_private, q)
				__UpperCAmelCase    	=  int(input('''Enter private key of B: '''))
				__UpperCAmelCase    	=  pow(a, b_private, q)

				__UpperCAmelCase    	=  pow(b_public, a_private, q)
				__UpperCAmelCase    	=  pow(a_public, b_private, q)

				print('''The key value generated by A is: ''', a_secret)
				print('''The key value generated by B is: ''', b_secret)





