

def 		_lowercase (     lowercase__   ,	lowercase__   ,	lowercase__   ,	lowercase__						):
      # Return True if there is node that has not iterated.
      __lowerCAmelCase					:						List[Any]					=					[False] * len(lowercase__						)
      __lowerCAmelCase					:						Any					=					[]
      queue.append(lowercase__						)
      __lowerCAmelCase					:						str					=					True

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

      return visited[t]







def 		_lowercase (     lowercase__   ,	lowercase__   ,	lowercase__						):
      # This array is filled by BFS and to store path
      __lowerCAmelCase					:						Optional[Any]					=					[-1] * (len(lowercase__						))
      __lowerCAmelCase					:						str					=					0
      while bfs(lowercase__   ,	lowercase__   ,	lowercase__   ,	lowercase__						):
            __lowerCAmelCase					:						Union[str, Any]					=					float('''Inf'''						)
            __lowerCAmelCase					:						Optional[int]					=					sink

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

            max_flow += path_flow
            __lowerCAmelCase					:						List[Any]					=					sink

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


_UpperCamelCase 			=		[
    [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],
]

_UpperCamelCase			,			_UpperCamelCase 			=		0, 5







print(ford_fulkerson(graph, source, sink))





def 		_lowercase (     lowercase__   ,	lowercase__						):

      if density <= 0:
            raise ValueError('''Impossible fluid density'''						)
      if bulk_modulus <= 0:
            raise ValueError('''Impossible bulk modulus'''						)

      return (bulk_modulus / density) ** 0.5


if __name__ == "__main__":
 import doctest

 doctest.testmod()


