public void ValueSolve(int[][] matr) {
        if (checkSolve(matr)) {
            ArrayList<Integer> Colors = this.Colors;
            HashSet<Integer> tmp = new HashSet();
            for (int i = 0; i < Colors.size(); i++) {
                tmp.add(Colors.get(i));
            }
            this.Value = tmp.size();
        } else {
            this.Value = Colors.size() + 1;
        }
    }