Need iterative version DFS.