Abandoning the non-recursive dfs