private void constraint_31A() throws IOException {

        for (int k = 1; k <= NUM_VARS; k++) {
            for (int m = 1; m <= SQUARE_SIZE; m += 3) {
                for (int n = 1; n <= SQUARE_SIZE; n += 3) {

                    for (int i = 0; i < 3; i++) {
                        for (int j = 0; j < 3; j++) {
                            out.append((m + i) + "" + (n + j) + "" + k + " ");
                        }
                    }
                    out.append("0\n");
                }
            }
        }
    }