



from typing import TYPE_CHECKING

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


UpperCAmelCase_		 =					{
    '''configuration_m2m_100''': ['''M2M_100_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''M2M100Config''', '''M2M100OnnxConfig'''],
    '''tokenization_m2m_100''': ['''M2M100Tokenizer'''],
}


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase_		 =					[
       '''M2M_100_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''M2M100ForConditionalGeneration''',
       '''M2M100Model''',
       '''M2M100PreTrainedModel''',
   ]


if TYPE_CHECKING:
   from .configuration_mam_aaa import M2M_100_PRETRAINED_CONFIG_ARCHIVE_MAP, MaMaaaConfig, MaMaaaOnnxConfig
   from .tokenization_mam_aaa import MaMaaaTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_mam_aaa import (
          M2M_100_PRETRAINED_MODEL_ARCHIVE_LIST,
          MaMaaaForConditionalGeneration,
          MaMaaaModel,
          MaMaaaPreTrainedModel,
      )


else:
   import sys

   UpperCAmelCase_		 =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)









from collections import defaultdict


def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase )->	bool:
		SCREAMING_SNAKE_CASE_					      =							first_str.lower().strip()
		SCREAMING_SNAKE_CASE_					      =							second_str.lower().strip()

		# Remove whitespace
		SCREAMING_SNAKE_CASE_					      =							first_str.replace(' '    ,						'' )
		SCREAMING_SNAKE_CASE_					      =							second_str.replace(' '    ,						'' )

		# Strings of different lengths are not anagrams
		if len(lowerCAmelCase ) != len(lowerCAmelCase ):
				return False

		# Default values for count should be 0
		SCREAMING_SNAKE_CASE_					      =							defaultdict(lowerCAmelCase )

		# For each character in input strings,
		# increment count in the corresponding
		for i in range(len(lowerCAmelCase ) ):
				count[first_str[i]] += 1
				count[second_str[i]] -= 1

		return all(_count == 0 for _count in count.values() )


if __name__ == "__main__":
						from doctest import testmod

						testmod()
						SCREAMING_SNAKE_CASE:     Dict									= input('''Enter the first string ''').strip()
						SCREAMING_SNAKE_CASE:     str									= input('''Enter the second string ''').strip()

						SCREAMING_SNAKE_CASE:     Optional[Any]									= check_anagrams(input_a, input_b)
						print(f"""{input_a} and {input_b} are {'' if status else 'not '}anagrams.""")