






from __future__ import annotations

from random import randrange





def 						__UpperCAmelCase      (					a_):
							if len(_lowerCamelCase) < 2:
														return collection
							snake_case_           =							randrange(len(_lowerCamelCase))  # Use random element as pivot
							snake_case_           =							collection[pivot_index]
							snake_case_           =							[]  # All elements greater than pivot
							snake_case_           =							[]  # All elements less than or equal to pivot

							for element in collection[:pivot_index]:
														(greater if element > pivot else lesser).append(_lowerCamelCase)

							for element in collection[pivot_index + 1 :]:
														(greater if element > pivot else lesser).append(_lowerCamelCase)

							return [*quick_sort(_lowerCamelCase), pivot, *quick_sort(_lowerCamelCase)]


if __name__ == "__main__":
	lowercase  							= input("Enter numbers separated by a comma:\n").strip()
	lowercase  							= [int(item) for item in user_input.split(",")]
	print(quick_sort(unsorted))













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)





