




def      __lowerCAmelCase			(					UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase = 0	,      UpperCamelCase = 0      )     ->	int:
  lowerCAmelCase__				:  Tuple		       =     right or len(UpperCamelCase      ) - 1
  if left > right:
    return -1
  elif list_data[left] == key:
    return left
  elif list_data[right] == key:
    return right
  else:
    return search(UpperCamelCase	,      UpperCamelCase	,      left + 1	,      right - 1      )


if __name__ == "__main__":
     import doctest

     doctest.testmod()







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			(					UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase      )     ->	int:
  # Return True if there is node that has not iterated.
  lowerCAmelCase__				:  List[str]		       =     [False] * len(UpperCamelCase      )
  lowerCAmelCase__				:  int		       =     [s]
  lowerCAmelCase__				:  Dict		       =     True

  while queue:
    lowerCAmelCase__				:  Union[str, Any]		       =     queue.pop(0      )
    for ind in range(len(graph[u]      )      ):
      if visited[ind] is False and graph[u][ind] > 0:
        queue.append(UpperCamelCase      )
        lowerCAmelCase__				:  List[str]		       =     True
        lowerCAmelCase__				:  int		       =     u

  return visited[t]



def      __lowerCAmelCase			(					UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase      )     ->	Optional[Any]:
  lowerCAmelCase__				:  Dict		       =     [-1] * (len(UpperCamelCase      ))
  lowerCAmelCase__				:  Dict		       =     0
  lowerCAmelCase__				:  List[str]		       =     []
  lowerCAmelCase__				:  Tuple		       =     [i[:] for i in graph]  # Record original cut, copy.
  while bfs(UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase	,      UpperCamelCase      ):
    lowerCAmelCase__				:  Optional[Any]		       =     float('''Inf'''      )
    lowerCAmelCase__				:  Optional[Any]		       =     sink

    while s != source:
      # Find the minimum value in select path
      lowerCAmelCase__				:  Optional[Any]		       =     min(UpperCamelCase	,      graph[parent[s]][s]      )
      lowerCAmelCase__				:  Union[str, Any]		       =     parent[s]

    max_flow += path_flow
    lowerCAmelCase__				:  List[str]		       =     sink

    while v != source:
      lowerCAmelCase__				:  Union[str, Any]		       =     parent[v]
      graph[u][v] -= path_flow
      graph[v][u] += path_flow
      lowerCAmelCase__				:  Dict		       =     parent[v]

  for i in range(len(UpperCamelCase      )      ):
    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))

