Yet Another Maxflow Problem

CodeForces - 903G