Nice BFS + DFS.