


"""simple docstring"""






import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput


@dataclass
class      __lowerCamelCase	(       a__					):

     '''simple docstring'''
     A_							:						float
     A_							:						Optional[float]     =		None
     A_							:						Optional[float]     =		None







class      __lowerCamelCase	(       unittest.TestCase					):

     '''simple docstring'''


     def 				_UpperCAmelCase   (   self				)							->				List[str]:
          _a     						=					ModelOutputTest(a=30				)
          self.assertEqual(x.a     ,					30				)
          self.assertIsNone(x.b				)
          self.assertIsNone(x.c				)
          with self.assertRaises(__UpperCAmelCase				):
               _a     						=					x.d


     def 				_UpperCAmelCase   (   self				)							->				List[Any]:
          _a     						=					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)				)

          _a     						=					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 				_UpperCAmelCase   (   self				)							->				int:
          _a     						=					ModelOutputTest(a=30     ,					b=10				)
          self.assertEqual(x['''a''']     ,					30				)
          self.assertEqual(x['''b''']     ,					10				)
          with self.assertRaises(__UpperCAmelCase				):
               _a     						=					x['''c''']

          _a     						=					ModelOutputTest(a=30     ,					c=10				)
          self.assertEqual(x['''a''']     ,					30				)
          self.assertEqual(x['''c''']     ,					10				)
          with self.assertRaises(__UpperCAmelCase				):
               _a     						=					x['''b''']


     def 				_UpperCAmelCase   (   self				)							->				Tuple:
          _a     						=					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(__UpperCAmelCase				)     ,					['''a''']				)

          _a     						=					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(__UpperCAmelCase				)     ,					['''a''', '''b''']				)

          _a     						=					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(__UpperCAmelCase				)     ,					['''a''', '''c''']				)

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


     def 				_UpperCAmelCase   (   self				)							->				List[str]:
          _a     						=					ModelOutputTest(a=30				)
          _a     						=					10
          self.assertEqual(x.a     ,					10				)
          self.assertEqual(x['''a''']     ,					10				)


     def 				_UpperCAmelCase   (   self				)							->				str:
          _a     						=					ModelOutputTest(a=30				)
          _a     						=					10
          self.assertEqual(x.a     ,					10				)
          self.assertEqual(x['''a''']     ,					10				)


     def 				_UpperCAmelCase   (   self				)							->				Tuple:
          _a     						=					ModelOutputTest({'''a''': 30, '''b''': 10}				)
          self.assertEqual(list(x.keys()				)     ,					['''a''', '''b''']				)
          self.assertEqual(x.a     ,					30				)
          self.assertEqual(x.b     ,					10				)





     def 				_UpperCAmelCase   (   self				)							->				Dict:
          _a     						=					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(__UpperCAmelCase				):
               _a     						=					ModelOutputTest([('''a''', 30), (10, 10)]				)

          _a     						=					ModelOutputTest(a=(30, 30)				)
          self.assertEqual(list(x.keys()				)     ,					['''a''']				)
          self.assertEqual(x.a     ,					(30, 30)				)



"""simple docstring"""






def    A_ ( _lowerCAmelCase  :       str,  _lowerCAmelCase  :       str							):






     """simple docstring"""

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

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

     _a     						=					list(range(len(_lowerCAmelCase							) + 1							)							)

     for i, ca in enumerate(_lowerCAmelCase							):
          _a     						=					[i + 1]

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

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


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

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