Fix python3 compat in preflow-push maxflow algorithm