Python Dfs Implementation Using Python