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.*;
import java.util.*;

public class HelloWorld {
    
    InputReader input;
    PrintWriter output;
    
    void run(){
        output = new PrintWriter(new OutputStreamWriter(System.out));
        input = new InputReader(System.in);
        solve();
        output.flush();
    }
    
    public static void main(String[] args){
        new HelloWorld().run();
    }

    void solve() {
        int n = input.readInt();
        int k = input.readInt();
        String stripe = input.readString();
        char[] s = stripe.toCharArray();
        int cnt = 0;
        if(k == 2) {
            char[] a = new char[n+1];
            char[] b = new char[n+1];
            int ad = 0;
            int bd = 0;
            for(int i = 0; i < n; i++) {
                if(i % 2 == 0) {
                    a[i] = 'A';
                    b[i] = 'B';
                    ad += Math.abs(s[i] - a[i]);
                    bd += Math.abs(s[i] - b[i]);
                }
                else {
                    b[i] = 'A';
                    a[i] = 'B';
                    ad += Math.abs(s[i] - a[i]);
                    bd += Math.abs(s[i] - b[i]);
                }
            }
            if(ad < bd) {
                cnt = ad;
                s = a;
            }
            else {
                cnt = bd;
                s = b;
            }
        }
        else {
            for(int i = 1; i < n; i++) {
                if(s[i] == s[i-1]) {
                    int c = (int)'A';
                    while(i < n-1 && c == s[i+1] || c == s[i-1]) {
                        c++;
                    }
                    s[i] = (char)c;
                    cnt++;
                }
            }
        }
        output.println(cnt);
        for(int i = 0; i < n; i++) {
            output.print(s[i]);
        }
    }
    
    
    class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        
        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars)
        {
        curChar = 0;
        try {
            numChars = stream.read(buf);
        } catch (IOException e) {
            throw new InputMismatchException();
        }
        if (numChars <= 0)
        return -1;
        }
        return buf[curChar++];
        }
        
        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
            c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        
        public String readString() {
            int c = read();
            while (isSpaceChar(c))
            c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        
        public Long readLong() {
            return Long.parseLong(readString());
        }
        
        public Double readDouble() {
            return Double.parseDouble(readString());
        }
        
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    } 
    
}