



'''simple docstring'''




from itertools import product



def  __lowerCamelCase    (   _lowercase = 1_5						) ->     int:
							UpperCAmelCase	:						float					=						0.0
							UpperCAmelCase	:						float
							UpperCAmelCase	:						int
							UpperCAmelCase	:						int
							UpperCAmelCase	:						int
							UpperCAmelCase	:						int
							UpperCAmelCase	:						tuple[int, ...]

							for series in product(range(2						)      ,							repeat=_lowercase						):
														UpperCAmelCase	:						Optional[int]					=						series.count(1						)
														UpperCAmelCase	:						Optional[Any]					=						num_turns - num_blue
														if num_red >= num_blue:
																					continue
														UpperCAmelCase	:						Tuple					=						1.0
														for ind, col in enumerate(_lowercase      ,							2						):
																					if col == 0:
																												prob *= (ind - 1) / ind
																					else:
																												prob *= 1 / ind

														total_prob += prob

							return int(1 / total_prob						)


if __name__ == "__main__":
							print(F'''{solution() = }''')






'''simple docstring'''




from __future__ import annotations



def  __lowerCamelCase    (   _lowercase						) ->     int | None:
							for r in range(1      ,							_lowercase						):
														UpperCAmelCase	:						Dict					=						[]
														for x in range(n - 1						):
																					UpperCAmelCase	:						List[str]					=						pow(_lowercase      ,							_lowercase      ,							_lowercase						)
																					if val in li:
																												break
																					li.append(_lowercase						)
														else:
																					return r
							return None


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

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

