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

public class MainC {

    
    
    
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        String aux = sc.next(); aux += '*';
        char s[] = aux.toCharArray();
        char output[] = new char [s.length-1];
        
        if(k == 2){
            int cnt1 = 0;
            int cnt2 = 0;
            for(int i = 0; i < n; i++){
                if(i%2 == 0){
                    if(s[i] == 'A'){
                        cnt2++;
                    }else{
                        cnt1++;
                    }
                }else{
                    if(s[i] == 'A'){
                        cnt1++;
                    }else{
                        cnt2++;
                    }
                }
            }
            if(cnt1 < cnt2){
                
                for(int i = 0; i < n; i++){
                    if(i % 2 == 0){
                        output[i] = 'A';
                    }else{
                        output[i] = 'B';
                    }
                }
                out.println(cnt1);
            
            }else{
                
                for(int i = 0; i < n; i++){
                    if(i % 2 == 0){
                        output[i] = 'B';
                    }else{
                        output[i] = 'A';
                    }
                }
                out.println(cnt2);
                
            }
            
            out.println(output);
            
        }else{
            
            char cur[] = new char [s.length]; 
            cur[0]=s[0];
            int tam = 1;
            char ant = s[0];
            
            n++;
            int cnt = 0;
            int id = 0;
            for(int i = 1; i < n;i++){
            
                if(s[i] != ant){
                    int cambios = 0;
                    if(tam % 2 == 1){
                        char e = 'A';
                        if(cur[0]== 'A'){
                            e = 'B';
                        }
                        for(int j = 0; j < tam; j++){
                            if(j%2 == 1){
                                cambios++;
                                output[id++] = e;
                            }else{
                                output[id++] = cur[j];
                            }
                        }
                    }else{
                        char e = 'A';
                        if(s[i] == e || cur[0] == e){
                            e = 'B';
                        }
                        if(s[i] == e || cur[0] == e){
                            e = 'C';
                        }
                        for(int j = 0; j < tam; j++){
                            if(j%2 == 1){
                                output[id++] = e;
                                cambios++;
                            }else{
                                output[id++] = cur[j];
                            }
                        }
                    }
                    cnt+=cambios;
                    tam = 1;
                    cur[0] = s[i];
                }else{
                    cur[tam++] = s[i];
                }
                ant = s[i];
                
                
            }
            out.println(cnt);
            out.println(output);
        }
        
        out.close();
    }
    
    
    
   //-----------Fast input----------
    public static PrintWriter out;
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}