"""simple docstring"""





class  _snake_case     :






      def __init__(       self      :			int    ):
             __lowerCamelCase					:		Any		   =     ""
             __lowerCamelCase					:		Dict		   =     ""
             __lowerCamelCase					:		int		   =     []






      def       lowerCamelCase__     (       self      :			Optional[int]							,					UpperCAmelCase      :			Union[str, Any]							,					UpperCAmelCase      :			List[str]    ):


             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]:
                           __lowerCamelCase					:		str		   =     self.__min_dist_top_down_dp(m - 1							,					n - 1    )
                    else:
                           __lowerCamelCase					:		Optional[Any]		   =     self.__min_dist_top_down_dp(__UpperCamelCase							,					n - 1    )
                           __lowerCamelCase					:		List[str]		   =     self.__min_dist_top_down_dp(m - 1							,					__UpperCamelCase    )
                           __lowerCamelCase					:		int		   =     self.__min_dist_top_down_dp(m - 1							,					n - 1    )
                           __lowerCamelCase					:		List[Any]		   =     1 + min(__UpperCamelCase							,					__UpperCamelCase							,					__UpperCamelCase    )

                    return self.dp[m][n]






      def       lowerCamelCase__     (       self      :			str							,					UpperCAmelCase      :			List[Any]							,					UpperCAmelCase      :			Dict    ):
             __lowerCamelCase					:		List[Any]		   =     worda
             __lowerCamelCase					:		Optional[int]		   =     worda
             __lowerCamelCase					:		List[Any]		   =     [[-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      :			Union[str, Any]							,					UpperCAmelCase      :			Any							,					UpperCAmelCase      :			Dict    ):
             __lowerCamelCase					:		List[str]		   =     worda
             __lowerCamelCase					:		str		   =     worda
             __lowerCamelCase					:		str		   =     len(__UpperCamelCase    )
             __lowerCamelCase					:		int		   =     len(__UpperCamelCase    )
             __lowerCamelCase					:		Optional[int]		   =     [[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
                                  __lowerCamelCase					:		int		   =     j
                           elif j == 0:  # second string is empty
                                  __lowerCamelCase					:		Any		   =     i
                           elif worda[i - 1] == worda[j - 1]:  # last characters are equal
                                  __lowerCamelCase					:		Any		   =     self.dp[i - 1][j - 1]
                           else:
                                  __lowerCamelCase					:		Tuple		   =     self.dp[i][j - 1]
                                  __lowerCamelCase					:		str		   =     self.dp[i - 1][j]
                                  __lowerCamelCase					:		Union[str, Any]		   =     self.dp[i - 1][j - 1]
                                  __lowerCamelCase					:		Optional[Any]		   =     1 + min(__UpperCamelCase							,					__UpperCamelCase							,					__UpperCamelCase    )
             return self.dp[m][n]


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

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

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





from functools import lru_cache


def    lowercase_   (   _lowerCamelCase:	int      ) ->      set:



							'''simple docstring'''

							__lowerCamelCase					:		Optional[Any]		   =     2
							__lowerCamelCase					:		Tuple		   =     set()
							while i * i <= n:
														if n % i:
																					i += 1
														else:
																					n //= i
																					factors.add(_lowerCamelCase      )
							if n > 1:
														factors.add(_lowerCamelCase      )
							return factors


@lru_cache
def    lowercase_   (   _lowerCamelCase:	int      ) ->      int:



							'''simple docstring'''

							return len(unique_prime_factors(_lowerCamelCase      )      )


def    lowercase_   (   _lowerCamelCase:	list      ) ->      bool:



							'''simple docstring'''

							return len(set(_lowerCamelCase      )      ) in (0, 1)


def    lowercase_   (   _lowerCamelCase:	int      ) ->      list:



							'''simple docstring'''

							__lowerCamelCase					:		str		   =     2

							while True:
														# Increment each value of a generated range
														__lowerCamelCase					:		int		   =     [base + i for i in range(_lowerCamelCase      )]

														# Run elements through out unique_prime_factors function
														# Append our target number to the end.
														__lowerCamelCase					:		Dict		   =     [upf_len(_lowerCamelCase      ) for x in group]
														checker.append(_lowerCamelCase      )

														# If all numbers in the list are equal, return the group variable.
														if equality(_lowerCamelCase      ):
																					return group

														# Increment our base variable by 1
														base += 1


def    lowercase_   (   _lowerCamelCase:	int = 4      ) ->      int:



							'''simple docstring'''

							__lowerCamelCase					:		Any		   =     run(_lowerCamelCase      )
							return results[0] if len(_lowerCamelCase      ) else None


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