public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) {
        if(node == null) return null;
        UndirectedGraphNode ugn = new UndirectedGraphNode(node.label);
        if(set.keySet().contains(node)) return set.get(node);
        else set.put(node,ugn);
        if(node.neighbors == null || node.neighbors.size() == 0) return ugn;
        else
        {
           for(UndirectedGraphNode s:node.neighbors)
           {
               ugn.neighbors.add(cloneGraph(s));
           }
        }
        return ugn;
    }