uva10926: How many dependencies (DFS)