word transformation a slight strom on bfs