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

public class Main {
    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out,true);
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int k = s.nextInt();
        int c = 0;
        char[] mas = s.next().toCharArray();
        int[][] dp = new int[k][n+1];
        for(int i = 1;i <= n;i++) {
            for(int j = 0;j < k;j++) {
                int min = Integer.MAX_VALUE;
                for(int m = 0;m < k;m++) if(m != j && dp[m][i-1] < min) min = dp[m][i-1];
                if(j == mas[i-1] - 'A') dp[j][i] = min;
                else dp[j][i] = min + 1;
            }
        }
        StringBuilder stb = new StringBuilder(n);
        int lastInd = -1;
        for(int i = n;i >= 1;i--) {
            int min = Integer.MAX_VALUE;
            int minInd = 0;
            for(int j = 0;j < k;j++) if(j != lastInd && dp[j][i] < min) min = dp[j][i];
            for(int j = 0;j < k;j++) if(j != lastInd && dp[j][i] == min) minInd = j;
            stb.append((char)(minInd+'A'));
            lastInd = minInd;
        }
        int ans = Integer.MAX_VALUE;
        for(int i = 0;i < k;i++) ans = Math.min(ans,dp[i][n]);
        out.println(ans);
        out.println(stb.reverse().toString());
    }
}