



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE__   			=   {
    '''configuration_megatron_bert''': ['''MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MegatronBertConfig'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							SCREAMING_SNAKE_CASE__   			=   [
							    '''MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''MegatronBertForCausalLM''',
							    '''MegatronBertForMaskedLM''',
							    '''MegatronBertForMultipleChoice''',
							    '''MegatronBertForNextSentencePrediction''',
							    '''MegatronBertForPreTraining''',
							    '''MegatronBertForQuestionAnswering''',
							    '''MegatronBertForSequenceClassification''',
							    '''MegatronBertForTokenClassification''',
							    '''MegatronBertModel''',
							    '''MegatronBertPreTrainedModel''',
							]

if TYPE_CHECKING:
							from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_megatron_bert import (
														    MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    MegatronBertForCausalLM,
														    MegatronBertForMaskedLM,
														    MegatronBertForMultipleChoice,
														    MegatronBertForNextSentencePrediction,
														    MegatronBertForPreTraining,
														    MegatronBertForQuestionAnswering,
														    MegatronBertForSequenceClassification,
														    MegatronBertForTokenClassification,
														    MegatronBertModel,
														    MegatronBertPreTrainedModel,
														)

else:
							import sys

							SCREAMING_SNAKE_CASE__   			=   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









def A    (							__UpperCamelCase			,						__UpperCamelCase			,						__UpperCamelCase       )    ->   int:

			if exponent == 1:
						return base
			if exponent % 2 == 0:
						A__	  =     _modexpt(__UpperCamelCase			,						exponent // 2			,						__UpperCamelCase       ) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(__UpperCamelCase			,						exponent - 1			,						__UpperCamelCase       )) % modulo_value


def A    (							__UpperCamelCase = 1_777			,						__UpperCamelCase = 1_855			,						__UpperCamelCase = 8       )    ->   int:
			A__	  =     base
			for _ in range(1			,						__UpperCamelCase       ):
						A__	  =     _modexpt(__UpperCamelCase			,						__UpperCamelCase			,						10**digits       )

			return result


if __name__ == "__main__":
							print(f'{solution() = }')




