from __future__ import annotations







def SCREAMING_SNAKE_CASE			(       lowercase_:		int			):
       for r in range(1						,  lowercase_			):
              _UpperCamelCase       :    List[str]					  =					[]
              for x in range(n - 1			):
                     _UpperCamelCase       :    int					  =					pow(lowercase_						,  lowercase_						,  lowercase_			)
                     if val in li:
                            break
                     li.append(lowercase_			)
              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)




def SCREAMING_SNAKE_CASE			(       lowercase_:		list[int]			):

       # validate:
       if not isinstance(lowercase_						,  lowercase_			) or not all(
           isinstance(lowercase_						,  lowercase_			) and item >= 0 for item in citations			):
              raise ValueError('The citations should be a list of non negative integers.'			)

       citations.sort()
       _UpperCamelCase       :    List[str]					  =					len(lowercase_			)

       for i in range(lowercase_			):
              if citations[len_citations - 1 - i] <= i:
                     return i

       return len_citations


if __name__ == "__main__":
 import doctest

 doctest.testmod()



