Optimized DFS - 11 min for depth 2