def 	__lowerCamelCase							(				__a    : str      ,							__a    : str		)      ->       int:
	# The longer word should come first
	if len(__a		) < len(__a		):
		return levenshtein_distance(__a      ,							__a		)

	if len(__a		) == 0:
		return len(__a		)

	_lowercase   =list(range(len(__a		) + 1		)		)

	for i, ca in enumerate(__a		):
		_lowercase   =[i + 1]

		for j, ca in enumerate(__a		):
			# Calculate insertions, deletions and substitutions
			_lowercase   =previous_row[j + 1] + 1
			_lowercase   =current_row[j] + 1
			_lowercase   =previous_row[j] + (ca != ca)

			# Get the minimum to append to the current row
			current_row.append(min(__a      ,							__a      ,							__a		)		)

		# Store the previous row
		_lowercase   =current_row

	# Returns the last element (distance)
	return previous_row[-1]


if __name__ == "__main__":
						lowerCAmelCase__  	=      input("Enter the first word:\n").strip()
						lowerCAmelCase__  	=      input("Enter the second word:\n").strip()

						lowerCAmelCase__  	=      levenshtein_distance(first_word, second_word)
						print(F'''Levenshtein distance between {first_word} and {second_word} is {result}''')









'''simple docstring'''

from __future__ import annotations



class 		lowerCamelCase__   :




					'''simple docstring'''



					def __init__(	self					:						str  ,	UpperCamelCase_					:						int       )	->							None:



						'''simple docstring'''





						_lowercase       :							Any  	=		value
						_lowercase       :							Node | None  	=		None
						_lowercase       :							Node | None  	=		None






class 		lowerCamelCase__   :




					'''simple docstring'''



					A_         =    42




					def __init__(	self					:						List[Any]       )	->							None:



						'''simple docstring'''





						_lowercase       :							Optional[int]  	=		0




					def     __UpperCAmelCase  (	self					:						str  ,	UpperCamelCase_					:						Node | None  ,	UpperCamelCase_					:						int       )	->							None:



						'''simple docstring'''





						if node is None:
							return

						if path_sum == self.target:
							self.paths += 1

						if node.left:
							self.depth_first_search(node.left  ,	path_sum + node.left.value       )
						if node.right:
							self.depth_first_search(node.right  ,	path_sum + node.right.value       )




					def     __UpperCAmelCase  (	self					:						Optional[int]  ,	UpperCamelCase_					:						Node | None  ,	UpperCamelCase_					:						int | None = None       )	->							int:



						'''simple docstring'''





						if node is None:
							return 0
						if target is not None:
							_lowercase       :							Union[str, Any]  	=		target

						self.depth_first_search(UpperCamelCase_  ,	node.value       )
						self.path_sum(node.left       )
						self.path_sum(node.right       )

						return self.paths


if __name__ == "__main__":
		import doctest

		doctest.testmod()
