

"""simple docstring"""


import os



def   _A					(	_a	:						str = "matrix.txt"				):



      """simple docstring"""






      with open(os.path.join(os.path.dirname(_a				)     ,   _a				)				) as in_file:
            A				  =		in_file.read()

      A				  =		[[int(_a				) for cell in row.split(""","""				)] for row in data.strip().splitlines()]
      A				  =		[[0 for cell in row] for row in grid]
      A				  =		len(grid[0]				)

      A				  =		[[0 for i in range(_a				)] for j in range(_a				)]
      A				  =		grid[0][0]
      for i in range(1     ,   _a				):
            A				  =		grid[0][i] + dp[0][i - 1]
      for i in range(1     ,   _a				):
            A				  =		grid[i][0] + dp[i - 1][0]

      for i in range(1     ,   _a				):
            for j in range(1     ,   _a				):
                  A				  =		grid[i][j] + min(dp[i - 1][j]     ,   dp[i][j - 1]				)

      return dp[-1][-1]


if __name__ == "__main__":
  print(f"""{solution() = }""")







"""simple docstring"""


import random





class lowerCamelCase__   :



    '''simple docstring'''




    @staticmethod
    def UpperCamelCase__		( lowerCamelCase_    )    ->      tuple[list[int], list[int]]:
          A				  =		[ord(lowerCamelCase_    ) for i in text]
          A				  =		[]
          A				  =		[]
          for i in plain:
                A				  =		random.randint(1 ,3_0_0    )
                A				  =		(i + k) * k
                cipher.append(lowerCamelCase_    )
                key.append(lowerCamelCase_    )
          return cipher, key




    @staticmethod
    def UpperCamelCase__		( lowerCamelCase_ ,lowerCamelCase_    )    ->      str:
          A				  =		[]
          for i in range(len(lowerCamelCase_    )    ):
                A				  =		int((cipher[i] - (key[i]) ** 2) / key[i]    )
                plain.append(chr(lowerCamelCase_    )    )
          return "".join(lowerCamelCase_    )


if __name__ == "__main__":
  UpperCAmelCase							,			UpperCAmelCase													=Onepad().encrypt("Hello")
  print(c, k)
  print(Onepad().decrypt(c, k))




