結果 : bfs and dfs in graph python