public boolean Check(ArrayList<Integer> slv){
        HashSet<Integer> tmp = new HashSet();
        for (int i : slv){
            tmp.addAll(sets.get(i));
        }
        return nodes.equals(tmp);
    }