






"""simple docstring"""





def 							A(    snake_case_						):
       """simple docstring"""





       lowercase__:							Tuple         =     word.upper()
       lowercase__:							List[Any]         =     0
       lowercase__:							int         =     {}
       lowercase__:							Optional[Any]         =     []

       for letter in word:
              if letter not in letter_nums:
                     lowercase__:							Any         =     str(UpperCamelCase_						)
                     next_num += 1
              word_pattern.append(letter_nums[letter]						)
       return ".".join(UpperCamelCase_						)


if __name__ == "__main__":
  import pprint
  import time

  UpperCamelCase					=     time.time()
  with open("""dictionary.txt""") as in_file:
    UpperCamelCase					=     in_file.read().splitlines()

  UpperCamelCase					=     {}
  for word in word_list:
    UpperCamelCase					=     get_word_pattern(word)
    if pattern in all_patterns:
      all_patterns[pattern].append(word)
    else:
      UpperCamelCase					=     [word]

  with open("""word_patterns.txt""", """w""") as out_file:
    out_file.write(pprint.pformat(all_patterns))

  UpperCamelCase					=     round(time.time() - start_time, 2)
  print(F"Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.")
  # Done!  9,581 word patterns found in 0.58 seconds.













from __future__ import annotations




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

