Topological sorting Running code