


'''simple docstring'''







from __future__ import annotations







def _UpperCamelCase	(					__A   )							->		int | None:


      '''simple docstring'''



      for r in range(1				,      __A   ):
            UpperCamelCase__  =    []
            for x in range(n - 1   ):
                  UpperCamelCase__  =    pow(__A				,      __A				,      __A   )
                  if val in li:
                        break
                  li.append(__A   )
            else:
                  return r
      return None


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

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









'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


a__  : Any				=	{
    'configuration_codegen': ['CODEGEN_PRETRAINED_CONFIG_ARCHIVE_MAP', 'CodeGenConfig', 'CodeGenOnnxConfig'],
    'tokenization_codegen': ['CodeGenTokenizer'],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a__  : Tuple				=	['CodeGenTokenizerFast']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a__  : Dict				=	[
      'CODEGEN_PRETRAINED_MODEL_ARCHIVE_LIST',
      'CodeGenForCausalLM',
      'CodeGenModel',
      'CodeGenPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_codegen import CODEGEN_PRETRAINED_CONFIG_ARCHIVE_MAP, CodeGenConfig, CodeGenOnnxConfig
  from .tokenization_codegen import CodeGenTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_codegen_fast import CodeGenTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_codegen import (
        CODEGEN_PRETRAINED_MODEL_ARCHIVE_LIST,
        CodeGenForCausalLM,
        CodeGenModel,
        CodeGenPreTrainedModel,
    )

else:
  import sys

  a__  : Optional[int]				=	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





