public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) {
		// write your code here
		if (node==null)
			return null;
		Map<UndirectedGraphNode,UndirectedGraphNode> map=new HashMap<>();
		Queue<UndirectedGraphNode>q=new ArrayDeque<>();
		q.offer(node);
		UndirectedGraphNode rel;
		map.put(node, rel=new UndirectedGraphNode(node.label));
		while (!q.isEmpty()) {
			for (int i=0, n=q.size();i<n;++i) {
				UndirectedGraphNode c=q.poll();
				UndirectedGraphNode cc=map.get(c);
				for (UndirectedGraphNode nc:c.neighbors) {
					UndirectedGraphNode ncc=map.get(nc);
					if (ncc==null) {
						q.offer(nc);
						map.put(nc, ncc=new UndirectedGraphNode(nc.label));
					}
					cc.neighbors.add(ncc);
				}
			}
		}
		return rel;
	}