complete bfs, the result is 2s