Two DFS Problem