"""simple docstring"""


def        __a (		A     ,					A     ,					A   ):






     '''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(A     ,					n - 1     ,					A   ) * a) % b

     lowercase__								=				bin_exp_mod(A     ,					n / 2     ,					A   )
     return (r * r) % b


if __name__ == "__main__":
 try:
  lowerCAmelCase_:       Tuple			     =       int(input("Enter Base : ").strip())
  lowerCAmelCase_:       Tuple			     =       int(input("Enter Power : ").strip())
  lowerCAmelCase_:       Tuple			     =       int(input("Enter Modulo : ").strip())
 except ValueError:
  print("Invalid literal for integer")

 print(bin_exp_mod(BASE, POWER, MODULO))





"""simple docstring"""


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


lowerCAmelCase_:       List[str]			     =       logging.get_logger(__name__)






class  a__     ( _a						):
   snake_case_				=   "speech-encoder-decoder"
   snake_case_				=   True


   def __init__(  self,					**_UpperCAmelCase	):
        '''simple docstring'''



        super().__init__(**_UpperCAmelCase	)
        if "encoder" not in kwargs or "decoder" not in kwargs:
             raise ValueError(
                 F'''A configuraton of type {self.model_type} cannot be instantiated because not both `encoder` and'''
                 F''' `decoder` sub-configurations are passed, but only {kwargs}'''	)

        lowercase__								=				kwargs.pop("encoder"	)
        lowercase__								=				encoder_config.pop("model_type"	)
        lowercase__								=				kwargs.pop("decoder"	)
        lowercase__								=				decoder_config.pop("model_type"	)

        lowercase__								=				AutoConfig.for_model(_UpperCAmelCase,					**_UpperCAmelCase	)
        lowercase__								=				AutoConfig.for_model(_UpperCAmelCase,					**_UpperCAmelCase	)
        lowercase__								=				True


   @classmethod
   def 						snake_case__						(  cls,					_UpperCAmelCase,					_UpperCAmelCase,					**_UpperCAmelCase	):
        '''simple docstring'''



        logger.info("Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"	)
        lowercase__								=				True
        lowercase__								=				True

        return cls(encoder=encoder_config.to_dict(),					decoder=decoder_config.to_dict(),					**_UpperCAmelCase	)


   def 						snake_case__						(  self	):
        '''simple docstring'''



        lowercase__								=				copy.deepcopy(self.__dict__	)
        lowercase__								=				self.encoder.to_dict()
        lowercase__								=				self.decoder.to_dict()
        lowercase__								=				self.__class__.model_type
        return output




