The undirected graph without loops and multiple edges with vertices is given (the vertices are numbered from to ). For each edge we know its capacity. Find the value of the maximum flow from the vertex to the vertex . The current can flow along each edge in both directions.
Two numbers and — the number of vertices and edges in a graph. Each of the next lines contains three numbers — the vertices, connected with an edge, and the capacity of this edge.
Print the maximum flow from the vertex to the vertex .