



'''simple docstring'''







from sklearn.neural_network import MLPClassifier

SCREAMING_SNAKE_CASE__     : Union[str, Any]				=   [[0.0, 0.0], [1.0, 1.0], [1.0, 0.0], [0.0, 1.0]]
SCREAMING_SNAKE_CASE__     : int				=   [0, 1, 0, 0]


SCREAMING_SNAKE_CASE__     : int				=   MLPClassifier(
    solver="""lbfgs""", alpha=1E-5, hidden_layer_sizes=(5, 2), random_state=1
)

clf.fit(X, y)


SCREAMING_SNAKE_CASE__     : Any				=   [[0.0, 0.0], [0.0, 1.0], [1.0, 1.0]]
SCREAMING_SNAKE_CASE__     : Any				=   clf.predict(test)







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		return list(SCREAMING_SNAKE_CASE     )


if __name__ == "__main__":
							import doctest

							doctest.testmod()

"""simple docstring"""






from __future__ import annotations



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


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

												lowerCAmelCase__    :    Union[str, Any]			=      pow(b_public, a_private, q)
												lowerCAmelCase__    :    Tuple			=      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)



