How To Implement Dfs Algorithm In Python