Graphs. min cut 2nd version