





"""simple docstring"""


from typing import Any



class   lowercase_					:

       def __init__(      self  ):






        '''simple docstring'''

        snake_case__     				=					[]
        snake_case__     				=					0

       def __str__(      self  ):






        '''simple docstring'''

        snake_case__     				=					"<" + str(self.stack  )[1:-1] + ">"
        return printed

       def 		_SCREAMING_SNAKE_CASE(      self ,       __SCREAMING_SNAKE_CASE  ):






        '''simple docstring'''

        self.stack.append(__SCREAMING_SNAKE_CASE  )
        snake_case__     				=					self.length + 1

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        self.rotate(1  )
        snake_case__     				=					self.stack[self.length - 1]
        snake_case__     				=					self.stack[:-1]
        self.rotate(self.length - 1  )
        snake_case__     				=					self.length - 1
        return dequeued

       def 		_SCREAMING_SNAKE_CASE(      self ,       __SCREAMING_SNAKE_CASE  ):






        '''simple docstring'''

        for _ in range(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					self.stack[0]
         snake_case__     				=					self.stack[1:]
         self.put(__SCREAMING_SNAKE_CASE  )
         snake_case__     				=					self.length - 1

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					self.get()
        self.put(__SCREAMING_SNAKE_CASE  )
        self.rotate(self.length - 1  )
        return front

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        return self.length








"""simple docstring"""


def 				a__      (	_UpperCAmelCase						,  _UpperCAmelCase						)     ->	int:

 '''simple docstring'''






 if len(_UpperCAmelCase						) < len(_UpperCAmelCase						):
  return levenshtein_distance(_UpperCAmelCase						,  _UpperCAmelCase						)

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

 snake_case__     				=					list(range(len(_UpperCAmelCase						) + 1						)						)

 for i, ca in enumerate(_UpperCAmelCase						):
  snake_case__     				=					[i + 1]

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

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

  # Store the previous row
  snake_case__     				=					current_row

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


if __name__ == "__main__":
   a__       :  Optional[int]       		=					input("""Enter the first word:\n""").strip()
   a__       :  int       		=					input("""Enter the second word:\n""").strip()

   a__       :  Union[str, Any]       		=					levenshtein_distance(first_word, second_word)
   print(f'''Levenshtein distance between {first_word} and {second_word} is {result}''')

