






"""simple docstring"""


from __future__ import annotations






class 						snake_case  :





    def __init__(							self	:					Optional[Any]				,		A	:					int = 0			):


      '''simple docstring'''




      a     :			Optional[Any]				=   value
      a     :			Node | None				=   None
      a     :			Node | None				=   None




def 			snake_case  (A_      :Node | None	,			A_      :Node | None      ):







  '''simple docstring'''

  if treea is None:
    return treea
  if treea is None:
    return treea

  a     :			Union[str, Any]				=   treea.value + treea.value
  a     :			List[Any]				=   merge_two_binary_trees(treea.left	,			treea.left      )
  a     :			Union[str, Any]				=   merge_two_binary_trees(treea.right	,			treea.right      )
  return treea




def 			snake_case  (A_      :Node | None      ):







  '''simple docstring'''

  if root:
    print(root.value      )
    print_preorder(root.left      )
    print_preorder(root.right      )


if __name__ == "__main__":
   _UpperCamelCase				:    Tuple     =						Node(1)
   _UpperCamelCase				:    int     =						Node(2)
   _UpperCamelCase				:    Union[str, Any]     =						Node(3)
   _UpperCamelCase				:    Optional[int]     =						Node(4)

   _UpperCamelCase				:    Optional[Any]     =						Node(2)
   _UpperCamelCase				:    Tuple     =						Node(4)
   _UpperCamelCase				:    Union[str, Any]     =						Node(6)
   _UpperCamelCase				:    List[Any]     =						Node(9)
   _UpperCamelCase				:    Optional[Any]     =						Node(5)

   print('Tree1 is: ')
   print_preorder(treea)
   print('Tree2 is: ')
   print_preorder(treea)
   _UpperCamelCase				:    List[str]     =						merge_two_binary_trees(treea, treea)
   print('Merged Tree is: ')
   print_preorder(merged_tree)











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

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

  _snake_case      : Dict														=		list(range(len(lowerCAmelCase ) + 1 ) )

  for i, ca in enumerate(lowerCAmelCase ):
    _snake_case      : Optional[int]														=		[i + 1]

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

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


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

      lowerCAmelCase_        =			levenshtein_distance(first_word, second_word)
      print(F"""Levenshtein distance between {first_word} and {second_word} is {result}""")




