
from collections import defaultdict






def      lowerCamelCase__       (       __lowerCAmelCase						:						str					,							__lowerCAmelCase						:						str       ):




	"""simple docstring"""


	lowerCAmelCase_      			=			first_str.lower().strip()
	lowerCAmelCase_      			=			second_str.lower().strip()

	# Remove whitespace
	lowerCAmelCase_      			=			first_str.replace(" "					,							""       )
	lowerCAmelCase_      			=			second_str.replace(" "					,							""       )

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

	# Default values for count should be 0
	lowerCAmelCase_      			=			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()
			_A     =  input("Enter the first string ").strip()
			_A     =  input("Enter the second string ").strip()

			_A     =  check_anagrams(input_a, input_b)
			print(f"""{input_a} and {input_b} are {'' if status else 'not '}anagrams.""")





import functools






def      lowerCamelCase__       (       __lowerCAmelCase						:						str					,							__lowerCAmelCase						:						str       ):




			"""simple docstring"""


			lowerCAmelCase_      			=			len(__lowerCAmelCase       )
			lowerCAmelCase_      			=			len(__lowerCAmelCase       )

			@functools.cache
			def min_distance(__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						int       ) -> int:
						# if first word index is overflow - delete all from the second word
						if indexa >= len_worda:
									return len_worda - indexa
						# if second word index is overflow - delete all from the first word
						if indexa >= len_worda:
									return len_worda - indexa
						lowerCAmelCase_      			=			int(worda[indexa] != worda[indexa]       )  # current letters not identical
						return min(
						    1 + min_distance(indexa + 1					,							__lowerCAmelCase       )					,							1 + min_distance(__lowerCAmelCase					,							indexa + 1       )					,							diff + min_distance(indexa + 1					,							indexa + 1       )					,							)

			return min_distance(0					,							0       )


if __name__ == "__main__":
			import doctest

			doctest.testmod()



