Topological Sort - Preparation to IOI Part 2