
'''simple docstring'''
def 						A_(			A		:						list[int | list]						,			A		:						int):
							UpperCamelCase					       =			0
							for ele in arr:
														total_sum += product_sum(A						,			depth + 1) if isinstance(A						,			A) else ele
							return total_sum * depth







def 						A_(			A		:						list[int | list]):
							return product_sum(A						,			1)


if __name__ == "__main__":
						import doctest

						doctest.testmod()






"""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)






