def 						UpperCAmelCase							(		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_							)

     a	:     Any						      =    list(range(len(lowerCAmelCase_							) + 1							)							)

     for i, ca in enumerate(lowerCAmelCase_							):
          a	:     Tuple						      =    [i + 1]

          for j, ca in enumerate(lowerCAmelCase_							):
               # Calculate insertions, deletions and substitutions
               a	:     str						      =    previous_row[j + 1] + 1
               a	:     Optional[Any]						      =    current_row[j] + 1
               a	:     str						      =    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	:     Any						      =    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}''')
import math







def 						UpperCAmelCase							(		lowerCAmelCase_							)						->						int:
     return sum(int(lowerCAmelCase_							) for digit in str(lowerCAmelCase_							)							)







def 						UpperCAmelCase							(		lowerCAmelCase_ = 3_0							)						->						int:
     a	:     Optional[int]						      =    []
     for digit in range(2    ,   1_0_0							):
          for power in range(2    ,   1_0_0							):
               a	:     List[str]						      =    int(math.pow(lowerCAmelCase_    ,   lowerCAmelCase_							)							)
               if digit == digit_sum(lowerCAmelCase_							):
                    digit_to_powers.append(lowerCAmelCase_							)

     digit_to_powers.sort()
     return digit_to_powers[n - 1]


if __name__ == "__main__":
  print(solution())