Stacking in DFS