Problem: A colored stripe is represented by a horizontal row of n square cells, each cell is pained one of k colors. Your task is to repaint the minimum number of cells so that no two neighbouring cells are of the same color. You can use any color from 1 to k to repaint the cells.

Input

The first input line contains two integers n and k (1 ≤ n ≤ 5·105; 2 ≤ k ≤ 26). The second line contains n uppercase English letters. Letter "A" stands for the first color, letter "B" stands for the second color and so on. The first k English letters may be used. Each letter represents the color of the corresponding cell of the stripe.

Output

Print a single integer — the required minimum number of repaintings. In the second line print any possible variant of the repainted stripe.

Examples

Input

6 3
ABBACC


Output

2
ABCACA


Input

3 2
BBB


Output

1
BAB

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            Debug debug = new Debug(out);
            int n = in.nextInt();
            int K = in.nextInt();
            char[] s = ("#" + in.nextString() + "$").toCharArray();
            if (K == 2) {
                int ctstA = 0;
                int ctstB = 0;
                for (int i = 1; i < s.length - 1; ++i) {
                    if (i % 2 == 1 && s[i] == 'A') ++ctstB;
                    if (i % 2 == 1 && s[i] == 'B') ++ctstA;
                    if (i % 2 == 0 && s[i] == 'B') ++ctstB;
                    if (i % 2 == 0 && s[i] == 'A') ++ctstA;
                }
                out.println(Math.min(ctstA, ctstB));
                if (ctstA < ctstB) {
                    for (int i = 0; i < n; ++i) {
                        if (i % 2 == 0) out.print("A");
                        if (i % 2 == 1) out.print("B");
                    }
                    out.println();
                } else {
                    for (int i = 0; i < n; ++i) {
                        if (i % 2 == 0) out.print("B");
                        if (i % 2 == 1) out.print("A");
                    }
                    out.println();
                }
                return;
            }
            StringBuilder stringBuilder = new StringBuilder();
            int ct = 0;
            for (int i = 1; i < s.length - 1; ) {
                int j = i + 1;
                while (j < s.length && (s[j] == s[i])) ++j;
                ct += (j - i) / 2;
                for (int k = i; k < j; ++k) {
                    if ((k - i) % 2 == 1) {
                        char temp = s[k];
                        while (temp == stringBuilder.charAt(k - 2) || temp == s[k + 1]) {
                            temp += 1;
                            if (temp >= 'A' + K)
                                temp = 'A';
                        }
                        s[k] = temp;
                        stringBuilder.append(temp);
                    } else {
                        stringBuilder.append(s[k]);
                    }
                }
                i = j;
            }
            out.println(ct);
            out.println(stringBuilder.toString());
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = pread();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }

    static class Debug {
        PrintWriter out;
        boolean oj;
        long timeBegin;
        Runtime runtime;

        public Debug(PrintWriter out) {
            oj = System.getProperty("ONLINE_JUDGE") != null;
            this.out = out;
            this.timeBegin = System.currentTimeMillis();
            this.runtime = Runtime.getRuntime();
        }

    }
}