Dfs Stack Implementation In Python