Reorient graph