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.util.Scanner;

public class WorkFile {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt(), k = s.nextInt();
        char[] arr = s.next().toCharArray();
        if (k==2) {
            int a = 0, b = 0;
            StringBuilder resa = new StringBuilder();
            StringBuilder resb = new StringBuilder();
            for (int i=0; i<n; i++) {
                if (i%2==0) {
                    if (arr[i]=='A') b++;
                    else a++;
                    resa.append('A'); resb.append('B');
                } else {
                    if (arr[i]=='A') a++;
                    else b++;
                    resa.append('B'); resb.append('A');
                }
            }
            if (a<=b) {
                System.out.println(a);
                System.out.println(resa);
            } else {
                System.out.println(b);
                System.out.println(resb);
            }
        } else {
            int res = 0;
            StringBuilder ans = new StringBuilder();
            ans.append(arr[0]);
            for (int i=1; i<n-1; i++) {
                char x = arr[i-1], y = arr[i], z = arr[i+1];
                if (x==y && y!=z) {
                    if (y!='A' && z!='A') arr[i] = 'A';
                    else if (y!='B' && z!='B') arr[i] = 'B';
                    else if (y!='C' && z!='C') arr[i] = 'C';
                    res++;
                } else if (x==y && y==z) {
                    if (x!='A') arr[i] = 'A';
                    else arr[i] = 'B';
                    res++;
                }
                ans.append(arr[i]);
            }
            if (n>=2 && arr[n-2]==arr[n-1]) {
                if (arr[n-1]=='A') arr[n-1] = 'B';
                else arr[n-1] = 'A';
                res++;
            }
            if (n>1) ans.append(arr[n-1]);
            System.out.println(res);
            System.out.println(ans);
        }
    }
}