




'''simple docstring'''


import os
def 						lowerCamelCase__   (				a = "matrix.txt"							):
						with open(os.path.join(os.path.dirname(a							)    ,	a							)							) as in_file:
												__snake_case						 =   in_file.read()

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

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

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

						return dp[-1][-1]


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







'''simple docstring'''


def 						lowerCamelCase__   (				a							):
						__snake_case						 =   [0] * len(a							)
						__snake_case						 =   []
						__snake_case						 =   []
						__snake_case						 =   0

						for values in graph.values():
												for i in values:
																		indegree[i] += 1

						for i in range(len(a							)							):
												if indegree[i] == 0:
																		queue.append(a							)

						while queue:
												__snake_case						 =   queue.pop(0							)
												cnt += 1
												topo.append(a							)
												for x in graph[vertex]:
																		indegree[x] -= 1
																		if indegree[x] == 0:
																								queue.append(a							)

						if cnt != len(a							):
												print('Cycle exists'							)
						else:
												print(a							)


# Adjacency List of Graph
_lowercase  =			{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}






topological_sort(graph)

