Finding your way out of a maze with DFS