

from __future__ import annotations







def _a					(			SCREAMING_SNAKE_CASE						:     int						)       ->       int | None:

 """simple docstring"""






 for r in range(1       ,   SCREAMING_SNAKE_CASE						):
  __lowerCAmelCase:  Optional[Any]        = []
  for x in range(n - 1						):
   __lowerCAmelCase:  Tuple        = pow(SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE       ,   SCREAMING_SNAKE_CASE						)
   if val in li:
    break
   li.append(SCREAMING_SNAKE_CASE						)
  else:
   return r
 return None


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

    _a									=  pow(b_public, a_private, q)
    _a									=  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)








def _a					(			SCREAMING_SNAKE_CASE						:     int						)       ->       int:

 """simple docstring"""






 return n * (2 * n - 1)







def _a					(			SCREAMING_SNAKE_CASE						:     int						)       ->       bool:

 """simple docstring"""






 __lowerCAmelCase:  List[Any]        = (1 + 24 * n) ** 0.5
 return ((1 + root) / 6) % 1 == 0







def _a					(			SCREAMING_SNAKE_CASE						:     int = 1_44						)       ->       int:

 """simple docstring"""






 __lowerCAmelCase:  Dict        = start
 __lowerCAmelCase:  List[str]        = hexagonal_num(SCREAMING_SNAKE_CASE						)
 while not is_pentagonal(SCREAMING_SNAKE_CASE						):
  n += 1
  __lowerCAmelCase:  Any        = hexagonal_num(SCREAMING_SNAKE_CASE						)
 return num


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





