結果 : iterative depth first search python code