






lowercase  							= [[0, 1, 1], [0, 0, 1], [1, 0, 0]]




class 			UpperCamelCase_				:



	'''simple docstring'''




	def __init__(	self	,      a )	->   List[str]:
								snake_case_           =							name
								snake_case_           =							[]
								snake_case_           =							[]




	def 							_UpperCamelCase      (	self	,      a )	->   Union[str, Any]:
								self.inbound.append(lowerCAmelCase__ )




	def 							_UpperCamelCase      (	self	,      a )	->   Union[str, Any]:
								self.outbound.append(lowerCAmelCase__ )






	def __repr__(	self )	->   Tuple:
								return F'''<node={self.name} inbound={self.inbound} outbound={self.outbound}>'''






def 						__UpperCAmelCase      (					a_							,					a_=3							,					a_=0.85):
							snake_case_           =							{}
							for node in nodes:
														snake_case_           =							1

							snake_case_           =							{}
							for node in nodes:
														snake_case_           =							len(node.outbound)

							for i in range(a_):
														print(f'''======= Iteration {i + 1} =======''')
														for _, node in enumerate(a_):
																					snake_case_           =							(1 - d) + d * sum(
																					    ranks[ib] / outbounds[ib] for ib in node.inbound)
														print(a_)





def 						__UpperCAmelCase      (					):
							snake_case_           =							list(input('Enter Names of the Nodes: ').split())

							snake_case_           =							[Node(a_) for name in names]

							for ri, row in enumerate(a_):
														for ci, col in enumerate(a_):
																					if col == 1:
																												nodes[ci].add_inbound(names[ri])
																												nodes[ri].add_outbound(names[ci])

							print('======= Nodes =======')
							for node in nodes:
														print(a_)

							page_rank(a_)


if __name__ == "__main__":
	main()













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)





