Hybrid bfs stepwise