Input: {**0,1,5**#1,2,5#2,3#3,4,4#4,5,5#5}

Output: {1,2,5#2,3#3,4,4#4,5,5#5}

Expected: {**0,1,5**#1,2,5#2,3#3,4,4#4,5,5#5}

```
class Solution:
# @param node, a undirected graph node
# @return a undirected graph node
def cloneGraph(self, node):
if node is None:
return None
visited = {}
visited[node] = UndirectedGraphNode(node.label)
stack = [node]
while stack != []:
node = stack.pop()
for nn in node.neighbors:
if nn in visited:
visited[node].neighbors.append(visited[nn])
continue
visited[nn] = UndirectedGraphNode(nn.label)
visited[node].neighbors.append(visited[nn])
stack.append(nn)
return visited.values()[0]
```

But, this solution does basically the same thing. I really can't figure out what is going on.