


# Function to print upper half of diamond (pyramid)







def        SCREAMING_SNAKE_CASE_						(			__A :			Optional[int]				)	->		Any:

       """simple docstring"""

       for i in range(0  ,    __A				):
              for _ in range(0  ,    n - i - 1				):  # printing spaces
                     print(' '  ,    end=''				)
              for _ in range(0  ,    i + 1				):  # printing stars
                     print('* '  ,    end=''				)
              print()







def        SCREAMING_SNAKE_CASE_						(			__A :			Tuple				)	->		Optional[Any]:

       """simple docstring"""

       for i in range(__A  ,    0  ,    -1				):
              for _ in range(__A  ,    0  ,    -1				):  # printing stars
                     print('* '  ,    end=''				)
              print()
              for _ in range(n - i + 1  ,    0  ,    -1				):  # printing spaces
                     print(' '  ,    end=''				)







def        SCREAMING_SNAKE_CASE_						(			__A :			List[Any]				)	->		Optional[Any]:

       """simple docstring"""

       if n <= 0:
              print('       ...       ....        nothing printing :('				)
              return
       floyd(__A				)  # upper half
       reverse_floyd(__A				)  # lower half


if __name__ == "__main__":
   print(R'| /\ | |- |  |-  |--| |\  /| |-')
   print(R'|/  \| |- |_ |_  |__| | \/ | |_')
   UpperCAmelCase_      : List[Any]  					=       1
   while K:
      UpperCAmelCase_      : Tuple  					=       int(input('enter the number and , and see the magic : '))
      print()
      pretty_print(user_number)
      UpperCAmelCase_      : str  					=       int(input('press 0 to exit... and 1 to continue...'))

   print('Good Bye...')






class        _a							:

							def __init__(							self:	Any							)			->   Tuple:





									"""simple docstring"""







									lowercase__            =      ''''''
									lowercase__            =      ''''''
									lowercase__            =      []

							def       lowerCamelCase_ (							self:	Union[str, Any]    ,						UpperCamelCase_:	int    ,						UpperCamelCase_:	int							)			->   int:





									"""simple docstring"""







									if m == -1:
											return n + 1
									elif n == -1:
											return m + 1
									elif self.dp[m][n] > -1:
											return self.dp[m][n]
									else:
											if self.worda[m] == self.worda[n]:
													lowercase__            =      self.__min_dist_top_down_dp(m - 1    ,						n - 1							)
											else:
													lowercase__            =      self.__min_dist_top_down_dp(UpperCamelCase_    ,						n - 1							)
													lowercase__            =      self.__min_dist_top_down_dp(m - 1    ,						UpperCamelCase_							)
													lowercase__            =      self.__min_dist_top_down_dp(m - 1    ,						n - 1							)
													lowercase__            =      1 + min(UpperCamelCase_    ,						UpperCamelCase_    ,						UpperCamelCase_							)

											return self.dp[m][n]

							def       lowerCamelCase_ (							self:	Union[str, Any]    ,						UpperCamelCase_:	str    ,						UpperCamelCase_:	str							)			->   int:





									"""simple docstring"""







									lowercase__            =      worda
									lowercase__            =      worda
									lowercase__            =      [[-1 for _ in range(len(UpperCamelCase_							)							)] for _ in range(len(UpperCamelCase_							)							)]

									return self.__min_dist_top_down_dp(len(UpperCamelCase_							) - 1    ,						len(UpperCamelCase_							) - 1							)


							def       lowerCamelCase_ (							self:	int    ,						UpperCamelCase_:	str    ,						UpperCamelCase_:	str							)			->   int:





									"""simple docstring"""







									lowercase__            =      worda
									lowercase__            =      worda
									lowercase__            =      len(UpperCamelCase_							)
									lowercase__            =      len(UpperCamelCase_							)
									lowercase__            =      [[0 for _ in range(n + 1							)] for _ in range(m + 1							)]

									for i in range(m + 1							):
											for j in range(n + 1							):
													if i == 0:  # first string is empty
															lowercase__            =      j
													elif j == 0:  # second string is empty
															lowercase__            =      i
													elif worda[i - 1] == worda[j - 1]:  # last characters are equal
															lowercase__            =      self.dp[i - 1][j - 1]
													else:
															lowercase__            =      self.dp[i][j - 1]
															lowercase__            =      self.dp[i - 1][j]
															lowercase__            =      self.dp[i - 1][j - 1]
															lowercase__            =      1 + min(UpperCamelCase_    ,						UpperCamelCase_    ,						UpperCamelCase_							)
									return self.dp[m][n]


if __name__ == "__main__":
			lowerCAmelCase       =							EditDistance()

			print('****************** Testing Edit Distance DP Algorithm ******************')
			print()

			lowerCAmelCase       =							input('Enter the first string: ').strip()
			lowerCAmelCase       =							input('Enter the second string: ').strip()

			print()
			print(f"""The minimum edit distance is: {solver.min_dist_top_down(Sa, Sa)}""")
			print(f"""The minimum edit distance is: {solver.min_dist_bottom_up(Sa, Sa)}""")
			print()
			print('*************** End of Testing Edit Distance DP Algorithm ***************')


