



import os
from string import ascii_letters

UpperCAmelCase_		   =				ascii_letters + " \t\n"

def   SCREAMING_SNAKE_CASE_       (  )     ->    dict[str, None]:
   _A						     =					os.path.split(os.path.realpath(_snake_case							)							)
   _A						     =					{}
   with open(path[0] + '''/dictionary.txt'''							) as dictionary_file:
      for word in dictionary_file.read().split('''\n'''							):
         _A						     =					None
   return english_words


UpperCAmelCase_		   =				load_dictionary()

def   SCREAMING_SNAKE_CASE_       (  _snake_case  :Optional[Any]							)     ->    float:
   _A						     =					message.upper()
   _A						     =					remove_non_letters(_snake_case							)
   _A						     =					message.split()
   _A						     =					len([word for word in possible_words if word in ENGLISH_WORDS]							)
   return float(_snake_case							) / len(_snake_case							)

def   SCREAMING_SNAKE_CASE_       (  _snake_case  :Optional[Any]							)     ->    str:
   return "".join(symbol for symbol in message if symbol in LETTERS_AND_SPACE							)

def   SCREAMING_SNAKE_CASE_       (  _snake_case  :Any  ,      _snake_case  :Optional[Any] = 20  ,      _snake_case  :Any = 85							)     ->    bool:
   _A						     =					get_english_count(_snake_case							) * 100 >= word_percentage
   _A						     =					len(remove_non_letters(_snake_case							)							)
   _A						     =					(float(_snake_case							) / len(_snake_case							)) * 100
   _A						     =					message_letters_percentage >= letter_percentage
   return words_match and letters_match


if __name__ == "__main__":
    import doctest

    doctest.testmod()








from __future__ import annotations

def   SCREAMING_SNAKE_CASE_       (  _snake_case  :int							)     ->    int | None:
   for r in range(1  ,      _snake_case							):
      _A						     =					[]
      for x in range(n - 1							):
         _A						     =					pow(_snake_case  ,      _snake_case  ,      _snake_case							)
         if val in li:
            break
         li.append(_snake_case							)
      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)



