





"""simple docstring"""


import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput



@dataclass
class   lowercase_					(  __lowerCAmelCase				):
       snake_case__					:				float
       snake_case__					:				Optional[float]									=  None
       snake_case__					:				Optional[float]									=  None



class   lowercase_					(  unittest.TestCase				):

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30  )
        self.assertEqual(x.a ,       30  )
        self.assertIsNone(x.b  )
        self.assertIsNone(x.c  )
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x.d

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30 ,       b=10  )
        self.assertEqual(x[0] ,       30  )
        self.assertEqual(x[1] ,       10  )
        self.assertEqual(x[:2] ,       (30, 10)  )
        self.assertEqual(x[:] ,       (30, 10)  )

        snake_case__     				=					ModelOutputTest(a=30 ,       c=10  )
        self.assertEqual(x[0] ,       30  )
        self.assertEqual(x[1] ,       10  )
        self.assertEqual(x[:2] ,       (30, 10)  )
        self.assertEqual(x[:] ,       (30, 10)  )

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30 ,       b=10  )
        self.assertEqual(x["a"] ,       30  )
        self.assertEqual(x["b"] ,       10  )
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x["c"]

        snake_case__     				=					ModelOutputTest(a=30 ,       c=10  )
        self.assertEqual(x["a"] ,       30  )
        self.assertEqual(x["c"] ,       10  )
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x["b"]

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30  )
        self.assertEqual(list(x.keys()  ) ,       ["a"]  )
        self.assertEqual(list(x.values()  ) ,       [30]  )
        self.assertEqual(list(x.items()  ) ,       [("a", 30)]  )
        self.assertEqual(list(__SCREAMING_SNAKE_CASE  ) ,       ["a"]  )

        snake_case__     				=					ModelOutputTest(a=30 ,       b=10  )
        self.assertEqual(list(x.keys()  ) ,       ["a", "b"]  )
        self.assertEqual(list(x.values()  ) ,       [30, 10]  )
        self.assertEqual(list(x.items()  ) ,       [("a", 30), ("b", 10)]  )
        self.assertEqual(list(__SCREAMING_SNAKE_CASE  ) ,       ["a", "b"]  )

        snake_case__     				=					ModelOutputTest(a=30 ,       c=10  )
        self.assertEqual(list(x.keys()  ) ,       ["a", "c"]  )
        self.assertEqual(list(x.values()  ) ,       [30, 10]  )
        self.assertEqual(list(x.items()  ) ,       [("a", 30), ("c", 10)]  )
        self.assertEqual(list(__SCREAMING_SNAKE_CASE  ) ,       ["a", "c"]  )

        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x.update({"d": 20}  )
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         del x["a"]
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x.pop("a"  )
        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					x.setdefault("d" ,       32  )

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30  )
        snake_case__     				=					10
        self.assertEqual(x.a ,       10  )
        self.assertEqual(x["a"] ,       10  )

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest(a=30  )
        snake_case__     				=					10
        self.assertEqual(x.a ,       10  )
        self.assertEqual(x["a"] ,       10  )

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest({"a": 30, "b": 10}  )
        self.assertEqual(list(x.keys()  ) ,       ["a", "b"]  )
        self.assertEqual(x.a ,       30  )
        self.assertEqual(x.b ,       10  )

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					ModelOutputTest([("a", 30), ("b", 10)]  )
        self.assertEqual(list(x.keys()  ) ,       ["a", "b"]  )
        self.assertEqual(x.a ,       30  )
        self.assertEqual(x.b ,       10  )

        with self.assertRaises(__SCREAMING_SNAKE_CASE  ):
         snake_case__     				=					ModelOutputTest([("a", 30), (10, 10)]  )

        snake_case__     				=					ModelOutputTest(a=(30, 30)  )
        self.assertEqual(list(x.keys()  ) ,       ["a"]  )
        self.assertEqual(x.a ,       (30, 30)  )








"""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}''')

