BFS found the end