



'''simple docstring'''





from __future__ import annotations

from typing import Generic, TypeVar

_UpperCamelCase							    =						TypeVar('T')






class  lowerCamelCase_   (    lowerCAmelCase__					):
  """simple docstring"""




  pass






class  lowerCamelCase_   (    lowerCAmelCase__					):
  """simple docstring"""




  pass






class  lowerCamelCase_   (    Generic[T]					):
  """simple docstring"""




  def __init__(			self				:     Union[str, Any]      ,     _a				:     int = 10       ) -> str:
    __lowerCamelCase	:	list[T]   	=			[]
    __lowerCamelCase	:	int   	=			limit




  def __bool__(			self				:     List[str]       ) -> int:
    return bool(self.stack       )




  def __str__(			self				:     Tuple       ) -> Dict:
    return str(self.stack       )




  def 						_lowercase					(			self				:     Any      ,     _a				:     T       ) -> Tuple:




    if len(self.stack       ) >= self.limit:
      raise StackOverflowError
    self.stack.append(_A       )




  def 						_lowercase					(			self				:     List[Any]       ) -> Any:




    if not self.stack:
      raise StackUnderflowError
    return self.stack.pop()




  def 						_lowercase					(			self				:     Tuple       ) -> Union[str, Any]:




    if not self.stack:
      raise StackUnderflowError
    return self.stack[-1]




  def 						_lowercase					(			self				:     Tuple       ) -> Dict:
    return not bool(self.stack       )




  def 						_lowercase					(			self				:     Any       ) -> List[Any]:
    return self.size() == self.limit




  def 						_lowercase					(			self				:     Union[str, Any]       ) -> List[Any]:
    return len(self.stack       )




  def __contains__(			self				:     Optional[Any]      ,     _a				:     T       ) -> Tuple:
    return item in self.stack




def 	a_					(							)				->				List[str]:
  __lowerCamelCase	:	Stack[int]   	=			Stack(10	)
  assert bool(lowercase__	) is False
  assert stack.is_empty() is True
  assert stack.is_full() is False
  assert str(lowercase__	) == "[]"

  try:
    __lowerCamelCase	:	List[Any]   	=			stack.pop()
    raise AssertionError  # This should not happen
  except StackUnderflowError:
    assert True  # This should happen

  try:
    __lowerCamelCase	:	Optional[Any]   	=			stack.peek()
    raise AssertionError  # This should not happen
  except StackUnderflowError:
    assert True  # This should happen

  for i in range(10	):
    assert stack.size() == i
    stack.push(lowercase__	)

  assert bool(lowercase__	)
  assert not stack.is_empty()
  assert stack.is_full()
  assert str(lowercase__	) == str(list(range(10	)	)	)
  assert stack.pop() == 9
  assert stack.peek() == 8

  stack.push(100	)
  assert str(lowercase__	) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 100]	)

  try:
    stack.push(200	)
    raise AssertionError  # This should not happen
  except StackOverflowError:
    assert True  # This should happen

  assert not stack.is_empty()
  assert stack.size() == 10

  assert 5 in stack
  assert 55 not in stack


if __name__ == "__main__":
   test_stack()











'''simple docstring'''





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

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

  __lowerCamelCase	:	int   	=			list(range(len(_lowerCAmelCase	) + 1	)	)

  for i, ca in enumerate(_lowerCAmelCase	):
    __lowerCamelCase	:	Union[str, Any]   	=			[i + 1]

    for j, ca in enumerate(_lowerCAmelCase	):
      # Calculate insertions, deletions and substitutions
      __lowerCamelCase	:	Any   	=			previous_row[j + 1] + 1
      __lowerCamelCase	:	int   	=			current_row[j] + 1
      __lowerCamelCase	:	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
    __lowerCamelCase	:	Optional[int]   	=			current_row

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


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

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






