結果 : depth first traversal in python