Export topological sort