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.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Solver {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String str = scanner.next();

        List<Integer> colors = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            char ch = str.charAt(i);
            int color = ch - 'A';
            colors.add(color);
        }

        if (k > 2) {
            solve(n, k, colors);
        }
        else {
            solve2(n, colors);
        }
    }

    private static void solve(int n, int k, List<Integer> colors) {
        colors.add(100);
        List<Integer> ans = new ArrayList<>(n);
        int diff = 0;
        ans.add(colors.get(0));
        for (int i = 1; i < n; i++) {
            if (!colors.get(i).equals(ans.get(i - 1))) {
                ans.add(colors.get(i));
                continue;
            }
            diff++;
            for (int j = 0; j < k; j++) {
                if (!ans.get(i-1).equals(j) && !colors.get(i+1).equals(j)) {
                    ans.add(j);
                    break;
                }
            }
        }

        System.out.println(diff);
        StringBuilder ansStr = new StringBuilder();
        for (int i = 0; i < n; i++) {
            ansStr.append((char)(ans.get(i)+'A'));
        }
        System.out.println(ansStr.toString());
    }

    private static void solve2(int n, List<Integer> colors) {
        List<Integer> ans1 = new ArrayList<>(n);
        List<Integer> ans2 = new ArrayList<>(n);
        int diff1 = 0;
        int diff2 = 0;

        for (int i = 0; i < n; i++) {
            if (i % 2 == 0) {
                ans1.add(0);
                if (colors.get(i) != 0)
                    diff1++;
            }
            else {
                ans1.add(1);
                if (colors.get(i) != 1)
                    diff1++;
            }
        }

        for (int i = 0; i < n; i++) {
            if (i % 2 == 1) {
                ans2.add(0);
                if (colors.get(i) != 0)
                    diff2++;
            }
            else {
                ans2.add(1);
                if (colors.get(i) != 1)
                    diff2++;
            }
        }

        StringBuilder ansStr = new StringBuilder();
        if (diff1 < diff2) {
            System.out.println(diff1);
            for (int i = 0; i < n; i++) {
                ansStr.append((char)(ans1.get(i)+'A'));
            }
        }
        else {
            System.out.println(diff2);
            for (int i = 0; i < n; i++) {
                ansStr.append((char)(ans2.get(i)+'A'));
            }
        }
        System.out.println(ansStr.toString());
    }
}