"""simple docstring"""




class 						__A							:






     def __init__(		self  ):
       _lowerCAmelCase						:       List[Any]  			=     """"""
       _lowerCAmelCase						:       Optional[int]  			=     """"""
       _lowerCAmelCase						:       List[str]  			=     []






     def     __A  (		self				,     a__				,     a__  ):
       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						:       Dict  			=     self.__min_dist_top_down_dp(a__				,     n - 1  )
           _lowerCAmelCase						:       int  			=     self.__min_dist_top_down_dp(m - 1				,     a__  )
           _lowerCAmelCase						:       str  			=     self.__min_dist_top_down_dp(m - 1				,     n - 1  )
           _lowerCAmelCase						:       Optional[int]  			=     1 + min(a__				,     a__				,     a__  )

         return self.dp[m][n]






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


if __name__ == "__main__":
     _a      :		List[str]           =   EditDistance()

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

     _a      :		List[Any]           =   input('Enter the first string: ').strip()
     _a      :		List[Any]           =   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'''




def       __lowerCamelCase  (					_lowercase	,				_lowercase		)      ->			int:
							if b == 0:
														return 1
							if (b % 2) == 0:
														return actual_power(_lowercase	,				int(b / 2		)		) * actual_power(_lowercase	,				int(b / 2		)		)
							else:
														return a * actual_power(_lowercase	,				int(b / 2		)		) * actual_power(_lowercase	,				int(b / 2		)		)



def       __lowerCamelCase  (					_lowercase	,				_lowercase		)      ->			float:
							if b < 0:
														return 1 / actual_power(_lowercase	,				_lowercase		)
							return actual_power(_lowercase	,				_lowercase		)


if __name__ == "__main__":
							print(power(-2, -3))

