結果 : greedy bfs algorithm in python