



def     __lowerCamelCase							(   __magic_name__						:	Optional[int]  ,			__magic_name__						:	Union[str, Any]  ,			__magic_name__						:	List[str]  ,			__magic_name__						:	int    ):
							if start == end:
														return start if lst[start] > item else start + 1
							if start > end:
														return start

							a__:							str									=(start + end) // 2
							if lst[mid] < item:
														return binary_search(__magic_name__  ,			__magic_name__  ,			mid + 1  ,			__magic_name__    )
							elif lst[mid] > item:
														return binary_search(__magic_name__  ,			__magic_name__  ,			__magic_name__  ,			mid - 1    )
							else:
														return mid





def     __lowerCamelCase							(   __magic_name__						:	Optional[int]    ):
							a__:							Tuple									=len(__magic_name__    )

							for index in range(1  ,			__magic_name__    ):
														a__:							str									=lst[index]
														a__:							List[Any]									=binary_search(__magic_name__  ,			__magic_name__  ,			0  ,			index - 1    )
														a__:							Tuple									=lst[:pos] + [value] + lst[pos:index] + lst[index + 1 :]

							return lst





def     __lowerCamelCase							(   __magic_name__						:	List[str]  ,			__magic_name__						:	List[str]    ):
							if not left:
														return right

							if not right:
														return left

							if left[0] < right[0]:
														return [left[0], *merge(left[1:]  ,			__magic_name__    )]

							return [right[0], *merge(__magic_name__  ,			right[1:]    )]





def     __lowerCamelCase							(   __magic_name__						:	Dict    ):
							a__:							Tuple									=len(__magic_name__    )
							a__				,      a__:							Any									=[], []
							a__:							str									=[lst[0]]
							a__:							Optional[Any]									=[]
							a__:							str									=1
							while i < length:
														if lst[i] < lst[i - 1]:
																					runs.append(__magic_name__    )
																					a__:							int									=[lst[i]]
														else:
																					new_run.append(lst[i]    )
														i += 1
							runs.append(__magic_name__    )

							for run in runs:
														sorted_runs.append(insertion_sort(__magic_name__    )    )
							for run in sorted_runs:
														a__:							List[Any]									=merge(__magic_name__  ,			__magic_name__    )

							return sorted_array





def     __lowerCamelCase							(   ):
							a__:							Tuple									=[5, 9, 10, 3, -4, 5, 178, 92, 46, -18, 0, 7]
							a__:							int									=tim_sort(__magic_name__    )
							print(__magic_name__    )


if __name__ == "__main__":
		main()










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)





