Import the topological sort program a bit.