
def  UpperCAmelCase_   (_lowerCAmelCase :		str     ,			_lowerCAmelCase :		str		):
			# The longer word should come first
			if len(_lowerCAmelCase		) < len(_lowerCAmelCase		):
						return levenshtein_distance(_lowerCAmelCase     ,			_lowerCAmelCase		)

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

			__UpperCamelCase    :    str								=      list(range(len(_lowerCAmelCase		) + 1		)		)

			for i, ca in enumerate(_lowerCAmelCase		):
						__UpperCamelCase    :    List[str]								=      [i + 1]

						for j, ca in enumerate(_lowerCAmelCase		):
									# Calculate insertions, deletions and substitutions
									__UpperCamelCase    :    Dict								=      previous_row[j + 1] + 1
									__UpperCamelCase    :    int								=      current_row[j] + 1
									__UpperCamelCase    :    Optional[Any]								=      previous_row[j] + (ca != ca)

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

						# Store the previous row
						__UpperCamelCase    :    Optional[int]								=      current_row

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


if __name__ == "__main__":
					lowercase     :       List[str]        =       input("Enter the first word:\n").strip()
					lowercase     :       Optional[Any]        =       input("Enter the second word:\n").strip()

					lowercase     :       Any        =       levenshtein_distance(first_word, second_word)
					print(F"""Levenshtein distance between {first_word} and {second_word} is {result}""")


from collections.abc import Callable

lowercase     :       Optional[Any]        =       Callable[[float], float]  # type alias for a real -> real function







def  UpperCAmelCase_   (_lowerCAmelCase :		RealFunc     ,			_lowerCAmelCase :		RealFunc     ,			_lowerCAmelCase :		int     ,			):
			__UpperCamelCase    :    Any								=      float(_lowerCAmelCase		)
			while True:
						try:
									__UpperCamelCase    :    List[Any]								=      prev_guess - function(_lowerCAmelCase		) / derivative(_lowerCAmelCase		)
						except ZeroDivisionError:
									raise ZeroDivisionError("Could not find root"		) from None
						if abs(prev_guess - next_guess		) < 10**-5:
									return next_guess
						__UpperCamelCase    :    Tuple								=      next_guess







def  UpperCAmelCase_   (_lowerCAmelCase :		float		):
			return (x**3) - (2 * x) - 5







def  UpperCAmelCase_   (_lowerCAmelCase :		float		):
			return 3 * (x**2) - 2


if __name__ == "__main__":
					print(newton(f, fa, 3))