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

public class Main implements Runnable {
		
	public void solve() throws IOException {
		int N = nextInt();
                int K = nextInt();
                
                char[] c = nextToken().toCharArray();
                
                int cnt = 0;
                if(K == 2){
                        char[] one = new char[N];
                        char[] two = new char[N];
                        boolean a = true;
                        for(int i = 0; i < N; i++){
                                if(a){ one[i] = 'A'; two[i] = 'B';}
                                else { one[i] = 'B'; two[i] = 'A';}
                                a = !a;
                        }
                        
                        int cnt1 = diff(one, c);
                        int cnt2 = diff(two, c);
                        if(cnt1 < cnt2){
                                System.out.println(cnt1);
                                System.out.println(new String(one));
                        }
                        else{
                                System.out.println(cnt2);
                                System.out.println(new String(two));
                        }
                }else{
                        for(int i = 1; i < N; i++){
                                if(c[i - 1] == c[i]){
                                        //System.err.println(i + " " + (i + 1));
                                        c[i] = getChar(c[i - 1], i < N - 1 ? c[i + 1] : '0');
                                        cnt++;
                                }
                        }
                        System.out.println(cnt);
                        System.out.println(new String(c));
                }
	}

        private char getChar(char a, char b){
                for(char c = 'A'; c <= 'Z'; c++){
                        if(c != a && c != b) return c;
                }
                
                return '#';
        }
        
        private int diff(char[] a, char[] b){
                int cnt = 0;
                for(int i = 0; i < a.length; i++) if(a[i] != b[i]) cnt++;
                
                return cnt;
        }
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//-----------------------------------------------------------
	public static void main(String[] args) {
		new Main().run();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			tok = null;
			solve();
			in.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BufferedReader in;
	StringTokenizer tok;
}