






class 					UpperCamelCase_ :



	'''simple docstring'''




	def __init__(			self   )			->       Optional[Any]:
								snake_case_           =				''
								snake_case_           =				''
								snake_case_           =				[]




	def 				_UpperCamelCase     (			self			,     a			,     a   )			->       int:
								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]:
																						snake_case_           =				self.__min_dist_top_down_dp(m - 1			,     n - 1   )
															else:
																						snake_case_           =				self.__min_dist_top_down_dp(a			,     n - 1   )
																						snake_case_           =				self.__min_dist_top_down_dp(m - 1			,     a   )
																						snake_case_           =				self.__min_dist_top_down_dp(m - 1			,     n - 1   )
																						snake_case_           =				1 + min(a			,     a			,     a   )

															return self.dp[m][n]




	def 				_UpperCamelCase     (			self			,     a			,     a   )			->       int:
								snake_case_           =				worda
								snake_case_           =				worda
								snake_case_           =				[[-1 for _ in range(len(a   )   )] for _ in range(len(a   )   )]

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






	def 				_UpperCamelCase     (			self			,     a			,     a   )			->       int:
								snake_case_           =				worda
								snake_case_           =				worda
								snake_case_           =				len(a   )
								snake_case_           =				len(a   )
								snake_case_           =				[[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
																													snake_case_           =				j
																						elif j == 0:  # second string is empty
																													snake_case_           =				i
																						elif worda[i - 1] == worda[j - 1]:  # last characters are equal
																													snake_case_           =				self.dp[i - 1][j - 1]
																						else:
																													snake_case_           =				self.dp[i][j - 1]
																													snake_case_           =				self.dp[i - 1][j]
																													snake_case_           =				self.dp[i - 1][j - 1]
																													snake_case_           =				1 + min(a			,     a			,     a   )
								return self.dp[m][n]


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

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

	lowercase    				=   input("Enter the first string: ").strip()
	lowercase    				=   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 ***************")













lowercase    				=   {
    "A": ".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.",
    "H": "....", "I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": "-.",
    "O": "---", "P": ".--.", "Q": "--.-", "R": ".-.", "S": "...", "T": "-", "U": "..-",
    "V": "...-", "W": ".--", "X": "-..-", "Y": "-.--", "Z": "--..", "1": ".----",
    "2": "..---", "3": "...--", "4": "....-", "5": ".....", "6": "-....", "7": "--...",
    "8": "---..", "9": "----.", "0": "-----", "&": ".-...", "@": ".--.-.",
    ":": "---...", ",": "--..--", ".": ".-.-.-", "'": ".----.", "\"": ".-..-.",
    "?": "..--..", "/": "-..-.", "=": "-...-", "+": ".-.-.", "-": "-....-",
    "(": "-.--.", ")": "-.--.-", "!": "-.-.--", " ": "/"
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
lowercase    				=   {value: key for key, value in MORSE_CODE_DICT.items()}





def 		__UpperCAmelCase     (	a_):
							return " ".join(MORSE_CODE_DICT[char] for char in message.upper())





def 		__UpperCAmelCase     (	a_):
							return "".join(REVERSE_DICT[char] for char in message.split())





def 		__UpperCAmelCase     (	):
							snake_case_           =				'Morse code here!'
							print(a_)
							snake_case_           =				encrypt(a_)
							print(a_)
							snake_case_           =				decrypt(a_)
							print(a_)


if __name__ == "__main__":
	main()





