from collections import deque def max_flow(s,t): def bb(n,g,w): if n==g: return w v[n]=0 while a[n]