Depth First Search (DFS) Algorithm Python Implementation