"""simple docstring"""


from __future__ import annotations





def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					list[int]:




						'''simple docstring'''



						lowerCamelCase__					=[0] * max_one

						for i in range(0   ,    __lowerCAmelCase				):
												lowerCamelCase__					=i

						for i in range(2   ,    __lowerCAmelCase				):
												if totients[i] == i:
																		for j in range(__lowerCAmelCase   ,    __lowerCAmelCase   ,    __lowerCAmelCase				):
																								totients[j] -= totients[j] // i

						return totients





def 			lowerCamelCase_ (					__lowerCAmelCase   ,    __lowerCAmelCase				)							->					bool:




						'''simple docstring'''



						return sorted(str(__lowerCAmelCase				)				) == sorted(str(__lowerCAmelCase				)				)





def 			lowerCamelCase_ (					__lowerCAmelCase = 1000_0000				)							->					int:




						'''simple docstring'''



						lowerCamelCase__					=1  # i
						lowerCamelCase__					=0  # φ(i)
						lowerCamelCase__					=get_totients(max_n + 1				)

						for i in range(2   ,    max_n + 1				):
												lowerCamelCase__					=totients[i]

												if i * min_denominator < min_numerator * t and has_same_digits(__lowerCAmelCase   ,    __lowerCAmelCase				):
																		lowerCamelCase__					=i
																		lowerCamelCase__					=t

						return min_numerator


if __name__ == "__main__":
	print(F'''{solution() = }''')




"""simple docstring"""

from __future__ import annotations
def 		UpperCAmelCase					(		a_			):





		'''simple docstring'''


		for r in range(1,						a_			):
				lowerCamelCase     :			Tuple		=    []
				for x in range(n - 1			):
						lowerCamelCase     :			List[str]		=    pow(a_,						a_,						a_			)
						if val in li:
								break
						li.append(a_			)
				else:
						return r
		return None


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

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






