public void backtrack(int i) {
        if (i>=sets.size())
            return;
        if (Solve.size() < bestSolve.size()) {
            Solve.add(i);
            if (!Check(Solve)) {
                backtrack(i + 1);
            } else {
                if (Solve.size() <= bestSolve.size()) {
                    bestSolve = new ArrayList();
                    for (int s : Solve) {
                        bestSolve.add(s);
                    }
                }
            }
            Solve.remove((Object) i);
        }
        if (!Check(Solve)) {
            backtrack(i + 1);
        } else {
            if (Solve.size() <= bestSolve.size()) {
                bestSolve = new ArrayList();
                for (int s : Solve) {
                    bestSolve.add(s);
                }
            }
        }
    }