swap, BFS