

def 			lowerCamelCase__			(       _a):
	return [
	    {
	        0: [1, 2],
	        1: [0, 2],
	        2: [0, 1, 3, 5],
	        3: [2, 4],
	        4: [3],
	        5: [2, 6, 8],
	        6: [5, 7],
	        7: [6, 8],
	        8: [5, 7],
	    },
	    {
	        0: [6],
	        1: [9],
	        2: [4, 5],
	        3: [4],
	        4: [2, 3],
	        5: [2],
	        6: [0, 7],
	        7: [6],
	        8: [],
	        9: [1],
	    },
	    {
	        0: [4],
	        1: [6],
	        2: [],
	        3: [5, 6, 7],
	        4: [0, 6],
	        5: [3, 8, 9],
	        6: [1, 3, 4, 7],
	        7: [3, 6, 8, 9],
	        8: [5, 7],
	        9: [5, 7],
	    },
	    {
	        0: [1, 3],
	        1: [0, 2, 4],
	        2: [1, 3, 4],
	        3: [0, 2, 4],
	        4: [1, 2, 3],
	    },
	][index]

def 			lowerCamelCase__			(       _a):
	SCREAMING_SNAKE_CASE :   List[Any]					  =							0
	SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							len(_a)  # No of vertices in graph
	SCREAMING_SNAKE_CASE :   str					  =							[0] * n
	SCREAMING_SNAKE_CASE :   str					  =							[False] * n

	def dfs(_a				,      _a				,      _a				,      _a):
		SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							True
		SCREAMING_SNAKE_CASE :   str					  =							id_
		id_ += 1
		for to in graph[at]:
			if to == parent:
				pass
			elif not visited[to]:
				dfs(_a				,      _a				,      _a				,      id_)
				SCREAMING_SNAKE_CASE :   List[Any]					  =							min(low[at]				,      low[to])
				if id_ <= low[to]:
					bridges.append((at, to) if at < to else (to, at))
			else:
				# This edge is a back edge and cannot be a bridge
				SCREAMING_SNAKE_CASE :   Tuple					  =							min(low[at]				,      low[to])

	SCREAMING_SNAKE_CASE :   list[tuple[int, int]]					  =							[]
	for i in range(_a):
		if not visited[i]:
			dfs(_a				,      -1				,      _a				,      id_)
	return bridges


if __name__ == "__main__":
			import doctest

			doctest.testmod()






def  SCREAMING_SNAKE_CASE				(      snake_case						,   snake_case						,   snake_case						,   snake_case							)		->    int:
		# Return True if there is node that has not iterated.
		__lowercase											=     [False] * len(snake_case							)
		__lowercase											=     []
		queue.append(snake_case							)
		__lowercase											=     True

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

		return visited[t]



def  SCREAMING_SNAKE_CASE				(      snake_case						,   snake_case						,   snake_case							)		->    Dict:
		# This array is filled by BFS and to store path
		__lowercase											=     [-1] * (len(snake_case							))
		__lowercase											=     0
		while bfs(snake_case						,   snake_case						,   snake_case						,   snake_case							):
				__lowercase											=     float('Inf'							)
				__lowercase											=     sink

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

				max_flow += path_flow
				__lowercase											=     sink

				while v != source:
						__lowercase											=     parent[v]
						graph[u][v] -= path_flow
						graph[v][u] += path_flow
						__lowercase											=     parent[v]
		return max_flow


SCREAMING_SNAKE_CASE_   :      Any			=   [
    [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],
]

SCREAMING_SNAKE_CASE_	,SCREAMING_SNAKE_CASE_   :      Optional[Any]			=   0, 5


print(ford_fulkerson(graph, source, sink))




