UVA124 - Following Orders

graph theory, topological sort.