public static ArrayList<HashSet<Integer>> transiveRule(HashSet<HashSet<Integer>> originSets) {
        HashSet<HashSet<Integer>> tempSet = deepCopySet(originSets);
        ArrayList<HashSet<Integer>> clusterList = new ArrayList<>();
        for (HashSet<Integer> temp : tempSet) {
            clusterList.add(temp);
        }
        for (int i = 0; i < clusterList.size(); i++) {
            HashSet<Integer> temp = clusterList.get(i);
            boolean mark;
            do {
                mark = false;
                for (int j = i + 1; j < clusterList.size(); j++) {
                    HashSet<Integer> temp2 = clusterList.get(j);
                    if (hasIntersect(temp, temp2)) {
                        temp.addAll(temp2);
                        clusterList.remove(clusterList.get(j));
                        clusterList.set(i, temp);
                        mark = true;
                    }
                }
            } while (mark);

        }

        return clusterList;

    }