



"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A :		Optional[Any]      							=    logging.get_logger(__name__)

__A :		Optional[int]      							=    {
    '''openbmb/cpm-ant-10b''': '''https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json'''
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}
class 							lowerCamelCase		( _UpperCAmelCase				):
   lowercase       :  List[Any]      =				'cpmant'







   def __init__(							self    ,      SCREAMING_SNAKE_CASE_ = 3_0720    ,      SCREAMING_SNAKE_CASE_ = 4096    ,      SCREAMING_SNAKE_CASE_ = 32    ,      SCREAMING_SNAKE_CASE_ = 128    ,      SCREAMING_SNAKE_CASE_ = 1_0240    ,      SCREAMING_SNAKE_CASE_ = 48    ,      SCREAMING_SNAKE_CASE_ = 0.0    ,      SCREAMING_SNAKE_CASE_ = 512    ,      SCREAMING_SNAKE_CASE_ = 2048    ,      SCREAMING_SNAKE_CASE_ = 1e-6    ,      SCREAMING_SNAKE_CASE_ = 1.0    ,      SCREAMING_SNAKE_CASE_ = 32    ,      SCREAMING_SNAKE_CASE_ = 32    ,      SCREAMING_SNAKE_CASE_ = 32    ,      SCREAMING_SNAKE_CASE_ = True    ,      **SCREAMING_SNAKE_CASE_    ,      ):
       super().__init__(**SCREAMING_SNAKE_CASE_ )
       UpperCamelCase				:   Union[str, Any]          =							prompt_types
       UpperCamelCase				:   Optional[int]          =							prompt_length
       UpperCamelCase				:   str          =							segment_types
       UpperCamelCase				:   Optional[int]          =							hidden_size
       UpperCamelCase				:   List[Any]          =							num_attention_heads
       UpperCamelCase				:   Any          =							dim_head
       UpperCamelCase				:   str          =							dim_ff
       UpperCamelCase				:   Any          =							num_hidden_layers
       UpperCamelCase				:   Optional[Any]          =							position_bias_num_buckets
       UpperCamelCase				:   Tuple          =							position_bias_max_distance
       UpperCamelCase				:   Union[str, Any]          =							dropout_p
       UpperCamelCase				:   Any          =							eps
       UpperCamelCase				:   Optional[int]          =							use_cache
       UpperCamelCase				:   Optional[Any]          =							vocab_size
       UpperCamelCase				:   str          =							init_std










"""simple docstring"""




def 					A_			(		snake_case_     :       Tuple						,snake_case_     :       Optional[Any]						,snake_case_     :       Optional[Any]    ):







    '''simple docstring'''
    assert b != 0, "This cannot accept modulo that is == 0"
    if n == 0:
        return 1

    if n % 2 == 1:
        return (bin_exp_mod(snake_case_						,n - 1						,snake_case_    ) * a) % b

    UpperCamelCase				:   List[Any]          =							bin_exp_mod(snake_case_						,n / 2						,snake_case_    )
    return (r * r) % b


if __name__ == "__main__":
  try:
    __A :		Any      							=    int(input('''Enter Base : ''').strip())
    __A :		Any      							=    int(input('''Enter Power : ''').strip())
    __A :		List[Any]      							=    int(input('''Enter Modulo : ''').strip())
  except ValueError:
    print('''Invalid literal for integer''')

  print(bin_exp_mod(BASE, POWER, MODULO))




