import numpy as np

A     :  Dict					     =       [
    ["a", "b", "c", "d", "e"],
    ["f", "g", "h", "i", "k"],
    ["l", "m", "n", "o", "p"],
    ["q", "r", "s", "t", "u"],
    ["v", "w", "x", "y", "z"],
]


class   lowerCamelCase					:
  """simple docstring"""







  def __init__(							self :       Union[str, Any]   )  ->	None:
        SCREAMING_SNAKE_CASE_          =  np.array(__magic_name__   )







  def    __A     (							self :       str  ,     __magic_name__ :       str   )  ->	np.ndarray:
        SCREAMING_SNAKE_CASE_     , SCREAMING_SNAKE_CASE_          =  np.where(letter == self.SQUARE   )
        SCREAMING_SNAKE_CASE_          =  np.concatenate([indexa + 1, indexa + 1]   )
        return indexes







  def    __A     (							self :       Optional[Any]  ,     __magic_name__ :       int  ,     __magic_name__ :       int   )  ->	str:
        SCREAMING_SNAKE_CASE_          =  self.SQUARE[indexa - 1, indexa - 1]
        return letter







  def    __A     (							self :       Tuple  ,     __magic_name__ :       str   )  ->	str:
        SCREAMING_SNAKE_CASE_          =  message.lower()
        SCREAMING_SNAKE_CASE_          =  message.replace(" "  ,     ""   )
        SCREAMING_SNAKE_CASE_          =  message.replace("j"  ,     "i"   )

        SCREAMING_SNAKE_CASE_          =  np.empty((2, len(__magic_name__   ))   )
        for letter_index in range(len(__magic_name__   )   ):
              SCREAMING_SNAKE_CASE_          =  self.letter_to_numbers(message[letter_index]   )

              SCREAMING_SNAKE_CASE_          =  numbers[0]
              SCREAMING_SNAKE_CASE_          =  numbers[1]

        SCREAMING_SNAKE_CASE_          =  first_step.reshape(2 * len(__magic_name__   )   )
        SCREAMING_SNAKE_CASE_          =  ""
        for numbers_index in range(len(__magic_name__   )   ):
              SCREAMING_SNAKE_CASE_          =  int(second_step[numbers_index * 2]   )
              SCREAMING_SNAKE_CASE_          =  int(second_step[(numbers_index * 2) + 1]   )
              SCREAMING_SNAKE_CASE_          =  self.numbers_to_letter(__magic_name__  ,     __magic_name__   )
              SCREAMING_SNAKE_CASE_          =  encoded_message + letter

        return encoded_message







  def    __A     (							self :       Optional[int]  ,     __magic_name__ :       str   )  ->	str:
        SCREAMING_SNAKE_CASE_          =  message.lower()
        message.replace(" "  ,     ""   )
        SCREAMING_SNAKE_CASE_          =  np.empty(2 * len(__magic_name__   )   )
        for letter_index in range(len(__magic_name__   )   ):
              SCREAMING_SNAKE_CASE_          =  self.letter_to_numbers(message[letter_index]   )
              SCREAMING_SNAKE_CASE_          =  numbers[0]
              SCREAMING_SNAKE_CASE_          =  numbers[1]

        SCREAMING_SNAKE_CASE_          =  first_step.reshape((2, len(__magic_name__   ))   )
        SCREAMING_SNAKE_CASE_          =  ""
        for numbers_index in range(len(__magic_name__   )   ):
              SCREAMING_SNAKE_CASE_          =  int(second_step[0, numbers_index]   )
              SCREAMING_SNAKE_CASE_          =  int(second_step[1, numbers_index]   )
              SCREAMING_SNAKE_CASE_          =  self.numbers_to_letter(__magic_name__  ,     __magic_name__   )
              SCREAMING_SNAKE_CASE_          =  decoded_message + letter

        return decoded_message



from __future__ import annotations


def      a__ (		__UpperCamelCase				):

      # preprocessing the first row
      for i in range(1     ,      len(matrix[0]				)				):
            matrix[0][i] += matrix[0][i - 1]

      # preprocessing the first column
      for i in range(1     ,      len(__UpperCamelCase				)				):
            matrix[i][0] += matrix[i - 1][0]

      # updating the path cost for current position
      for i in range(1     ,      len(__UpperCamelCase				)				):
            for j in range(1     ,      len(matrix[0]				)				):
                  matrix[i][j] += min(matrix[i - 1][j]     ,      matrix[i][j - 1]				)

      return matrix[-1][-1]


if __name__ == "__main__":
      import doctest

      doctest.testmod()


