Solved Topological Sort