






import re





def 						__UpperCAmelCase      (					a_):
							def docstring_decorator(a_):
														snake_case_           =							fn.__doc__
														snake_case_           =							func_doc.split('\n')
														snake_case_           =							0
														while i < len(a_) and re.search(R'^\s*Examples?:\s*$'							,					lines[i]) is None:
																					i += 1
														if i < len(a_):
																					snake_case_           =							example_docstring
																					snake_case_           =							'\n'.join(a_)
														else:
																					raise ValueError(
																					    f'''The function {fn} should have an empty \'Examples:\' in its docstring as placeholder, '''
																					    f'''current docstring is:\n{func_doc}''')
														snake_case_           =							func_doc
														return fn

							return docstring_decorator













from __future__ import annotations





def 						__UpperCAmelCase      (					a_):
							for r in range(1							,					a_):
														snake_case_           =							[]
														for x in range(n - 1):
																					snake_case_           =							pow(a_							,					a_							,					a_)
																					if val in li:
																												break
																					li.append(a_)
														else:
																					return r
							return None


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

		lowercase  							= pow(b_public, a_private, q)
		lowercase  							= 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)





