Escape using dfs