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

public class Main {
    public static void main(String []args) {
        new Main().run();
    }
    
    void run() {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        sc.nextLine();
        
        if(k == 2) {
            String s = sc.next();
            check(s, n);
            return;
        }
        
        char[] c = (sc.next() + '*').toCharArray();
        
        int min = 0;
        for(int i = 1; i < n; i++) {
            if(c[i] == c[i - 1]) {
                for(char r = 'A'; r <= 'Z'; r++) {
                    if(r != c[i - 1] && r != c[i + 1]) {
                        c[i] = r;
                        min++;
                        break;
                    }
                }
            }
        }
        
        System.out.println(min);
        System.out.println(new String(c).substring(0, n));
    }
    
    void check(String s, int n) {
        StringBuilder s1 = new StringBuilder();
        StringBuilder s2 = new StringBuilder();
        for(int i = 0; i < n; i++) {
            if(i % 2 == 0) {
                s1.append('A');
                s2.append('B');
            } else {
                s1.append('B');
                s2.append('A');
            }
        }
        int min1 = 0, min2 = 0;
        for(int i = 0; i < n; i++) {
            if(s1.charAt(i) != s.charAt(i)) {
                min1++;
            }
            if(s2.charAt(i) != s.charAt(i)) {
                min2++;
            }
        }
        System.out.println(Math.min(min1, min2));
        System.out.println(min1 < min2 ? s1 : s2);
    }
}