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

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        int n = in.nextInt();
        int k = in.nextInt();
        char[] str = in.next().toCharArray();
        int count = 0;
        if (k > 2) {
            for (int i = 1; i < n; ++i) {
                if (str[i] == str[i - 1]) {
                    ++count;
                    for (int j = 0; j < k; ++j) {
                        char change = (char) ('A' + j);
                        char after = i + 1 == n ? ' ' : str[i + 1];
                        if (change != str[i - 1] && change != after) {
                            str[i] = change;
                            break;
                        }
                    }
                }
            }
            System.out.println(count);
            System.out.println(str);
        } else {
            int[] countOdd = new int[2];
            int[] countEven = new int[2];
            for (int i = 0; i < n; ++i) {
                if (i % 2 == 1)
                    ++countOdd[str[i] - 'A'];
                else
                    ++countEven[str[i] - 'A'];
            }

            int countAB = countEven[0] + countOdd[1];
            int countBA = countEven[1] + countOdd[0];
            if (countAB > countBA) {
                System.out.println(n - countAB);
                for (int i = 0; i < n; ++i) {
                    out.print((char) ('A' + i % 2));
                }
            } else {
                System.out.println(n - countBA);
                for (int i = 0; i < n; ++i) {
                    out.print((char) ('B' - i % 2));
                }
            }
        }
        out.close();
    }
}