



'''simple docstring'''



import os



def   _A       (   _lowerCAmelCase = "matrix.txt"					):



							"""simple docstring"""



							with open(os.path.join(os.path.dirname(_lowerCAmelCase					)  ,   _lowerCAmelCase					)					) as in_file:
														__lowercase       	=in_file.read()

							__lowercase       	=[[int(_lowerCAmelCase					) for cell in row.split(','					)] for row in data.strip().splitlines()]
							__lowercase       	=[[0 for cell in row] for row in grid]
							__lowercase       	=len(grid[0]					)

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

							for i in range(1  ,   _lowerCAmelCase					):
														for j in range(1  ,   _lowerCAmelCase					):
																					__lowercase       	=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 string



def   _A       (   _lowerCAmelCase					):



							"""simple docstring"""



							__lowercase       	=''
							for i in sequence:
														__lowercase       	=ord(_lowerCAmelCase					)
														if 65 <= extract <= 90:
																					output += chr(155 - extract					)
														elif 97 <= extract <= 122:
																					output += chr(219 - extract					)
														else:
																					output += i
							return output



def   _A       (   _lowerCAmelCase					):



							"""simple docstring"""



							__lowercase       	=string.ascii_letters
							__lowercase       	=string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1]
							return "".join(
							    letters_reversed[letters.index(_lowerCAmelCase					)] if c in letters else c for c in sequence					)



def   _A       (   ):



							"""simple docstring"""



							from timeit import timeit

							print('Running performance benchmarks...'					)
							__lowercase       	='from string import printable ; from __main__ import atbash, atbash_slow'
							print(f"""> atbash_slow(): {timeit('atbash_slow(printable)'  ,   setup=_lowerCAmelCase					)} seconds"""					)
							print(f""">      atbash(): {timeit('atbash(printable)'  ,   setup=_lowerCAmelCase					)} seconds"""					)


if __name__ == "__main__":
		for example in ("ABCDEFGH", "123GGjj", "testStringtest", "with space"):
				print(f"{example} encrypted in atbash: {atbash(example)}")
		benchmark()



