
def 		UpperCamelCase	(      lowercase_   )		->	list:


  '''simple docstring'''






  lowercase__  :   int    		=      [0] * len(SCREAMING_SNAKE_CASE_   )

  for i in range(1 , len(SCREAMING_SNAKE_CASE_   )   ):
    # use last results for better performance - dynamic programming
    lowercase__  :   Optional[int]    		=      prefix_result[i - 1]
    while j > 0 and input_string[i] != input_string[j]:
      lowercase__  :   Optional[int]    		=      prefix_result[j - 1]

    if input_string[i] == input_string[j]:
      j += 1
    lowercase__  :   Optional[int]    		=      j

  return prefix_result

def 		UpperCamelCase	(      lowercase_   )		->	int:


  '''simple docstring'''






  return max(prefix_function(SCREAMING_SNAKE_CASE_   )   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()








lowerCamelCase__    :		str          =   [
    [0, 1_6, 1_3, 0, 0, 0],
    [0, 0, 1_0, 1_2, 0, 0],
    [0, 4, 0, 0, 1_4, 0],
    [0, 0, 9, 0, 0, 2_0],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

def 		UpperCamelCase	(      lowercase_ , lowercase_ , lowercase_ , lowercase_   )		->	str:


  '''simple docstring'''






  lowercase__  :   Any    		=      [False] * len(lowercase_   )
  lowercase__  :   List[Any]    		=      [s]
  lowercase__  :   int    		=      True

  while queue:
    lowercase__  :   Dict    		=      queue.pop(0   )
    for ind in range(len(graph[u]   )   ):
      if visited[ind] is False and graph[u][ind] > 0:
        queue.append(lowercase_   )
        lowercase__  :   Optional[Any]    		=      True
        lowercase__  :   int    		=      u

  return visited[t]

def 		UpperCamelCase	(      lowercase_ , lowercase_ , lowercase_   )		->	int:


  '''simple docstring'''






  lowercase__  :   Optional[int]    		=      [-1] * (len(lowercase_   ))
  lowercase__  :   Optional[Any]    		=      0
  lowercase__  :   List[Any]    		=      []
  lowercase__  :   Optional[Any]    		=      [i[:] for i in graph]  # Record original cut, copy.
  while bfs(lowercase_ , lowercase_ , lowercase_ , lowercase_   ):
    lowercase__  :   Optional[int]    		=      float("""Inf"""   )
    lowercase__  :   Tuple    		=      sink

    while s != source:
      # Find the minimum value in select path
      lowercase__  :   List[str]    		=      min(lowercase_ , graph[parent[s]][s]   )
      lowercase__  :   List[str]    		=      parent[s]

    max_flow += path_flow
    lowercase__  :   str    		=      sink

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

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






