



lowerCamelCase__			= [
    [0, 16, 13, 0, 0, 0],
    [0, 0, 10, 12, 0, 0],
    [0, 4, 0, 0, 14, 0],
    [0, 0, 9, 0, 0, 20],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			Any				,     _SCREAMING_SNAKE_CASE       :			List[str]				,     _SCREAMING_SNAKE_CASE       :			Union[str, Any]				,     _SCREAMING_SNAKE_CASE       :			Tuple    )     ->   Optional[int]:
				"""simple docstring"""







				__a       =		[False] * len(_SCREAMING_SNAKE_CASE    )
				__a       =		[s]
				__a       =		True

				while queue:
								__a       =		queue.pop(0    )
								for ind in range(len(graph[u]    )    ):
												if visited[ind] is False and graph[u][ind] > 0:
																queue.append(_SCREAMING_SNAKE_CASE    )
																__a       =		True
																__a       =		u

				return visited[t]

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			int				,     _SCREAMING_SNAKE_CASE       :			str				,     _SCREAMING_SNAKE_CASE       :			str    )     ->   List[Any]:
				"""simple docstring"""







				__a       =		[-1] * (len(_SCREAMING_SNAKE_CASE    ))
				__a       =		0
				__a       =		[]
				__a       =		[i[:] for i in graph]  # Record original cut, copy.
				while bfs(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    ):
								__a       =		float("""Inf"""    )
								__a       =		sink

								while s != source:
												# Find the minimum value in select path
												__a       =		min(_SCREAMING_SNAKE_CASE				,     graph[parent[s]][s]    )
												__a       =		parent[s]

								max_flow += path_flow
								__a       =		sink

								while v != source:
												__a       =		parent[v]
												graph[u][v] -= path_flow
												graph[v][u] += path_flow
												__a       =		parent[v]

				for i in range(len(_SCREAMING_SNAKE_CASE    )    ):
								for j in range(len(graph[0]    )    ):
												if graph[i][j] == 0 and temp[i][j] > 0:
																res.append((i, j)    )

				return res


if __name__ == "__main__":
						print(mincut(test_graph, source=0, sink=5))





import os

def   lowerCAmelCase__						(							):
				"""simple docstring"""







				__a       =		os.path.dirname(os.path.realpath(_SCREAMING_SNAKE_CASE    )    )
				__a       =		os.path.join(_SCREAMING_SNAKE_CASE				,     """triangle.txt"""    )

				with open(_SCREAMING_SNAKE_CASE    ) as f:
								__a       =		f.readlines()

				__a       =		[]
				for line in triangle:
								__a       =		[]
								for number in line.strip().split(""" """    ):
												numbers_from_line.append(int(_SCREAMING_SNAKE_CASE    )    )
								a.append(_SCREAMING_SNAKE_CASE    )

				for i in range(1				,     len(_SCREAMING_SNAKE_CASE    )    ):
								for j in range(len(a[i]    )    ):
												__a       =		a[i - 1][j] if j != len(a[i - 1]    ) else 0
												__a       =		a[i - 1][j - 1] if j > 0 else 0
												a[i][j] += max(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    )
				return max(a[-1]    )


if __name__ == "__main__":
						print(solution())
