Finish topological sort for assignment