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.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class C {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void solve() throws IOException {
        int n = readInt();
        int k = readInt();
        int[] t = new int[n];
        char[] c = readString().toCharArray();
        for(int i = 0; i < n; i++){
            t[i] = c[i]-'A';
        }
        int count = 0;
        if(k == 2){
            int first = 1;
            int[] r = new int[n];
            for(int i = 0; i < n; i++){
                r[i] = t[i];
            }
            t[0] ^= 1;
            for(int i = 1; i < n; i++){
                if(t[i] == t[i-1]){
                    first++;
                    t[i] ^= 1;
                }
            }
            int second = 0;
            for(int i = 1; i < n; i++){
                if(r[i] == r[i-1]){
                    second++;
                    r[i] ^= 1;
                }
            }
            if(first > second){
                t = r;
                first = second;
            }
            out.println(first);
            for(int i = 0; i < n; i++){
                out.print((char)(t[i]+'A'));
            }
        }       
        else{
            for(int i = 1; i < n; i++){
                if(t[i] == t[i-1]){
                    if(i == n - 1){
                        t[i] = (t[i] + 1) % k;
                    }
                    else{
                        for(int j = 0; j < k; j++){
                            if(t[i+1] != j && t[i-1] != j){
                                t[i] = j;
                                break;
                            }
                        }
                    }
                    count++;
                }
            }
            out.println(count);
            for(int i = 0; i < n; i++){
                out.print((char)(t[i]+'A'));
            }
        }
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    int[] readArr(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readArrL(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = readLong();
        }
        return res;
    }

    public static void main(String[] args) {
        new C().run();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
}