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 Main {
	
	Scanner in;
	static PrintWriter out;
	
	static class Scanner {
		StreamTokenizer in;
		
		Scanner(InputStream is) {
			in = new StreamTokenizer(new BufferedReader(new InputStreamReader(is)));
			  in.resetSyntax();
		         in.whitespaceChars(0, 32);
		         in.wordChars(33, 255);
		     
		}
		
		int nextInt() {
			try {
				in.nextToken();
				return Integer.parseInt(in.sval);
			} catch (IOException e) {
				throw new Error();
			}
		}
		
		String next() {
			try {
				in.nextToken();
				return in.sval;
			} catch (IOException e) {
				throw new Error();
			}
		}
	}
	
	
	char str[];
	int k;
	
	
	
	
	void solve() {
		int n = in.nextInt();
		k = in.nextInt();
		str = in.next().toCharArray();
		
		if (k == 2) {
			int cnt1 = 0;
			int cnt2 = 0;
			for (int i = 0; i < str.length; i++) {
				if ((i % 2 == 0 && str[i] == 'A') || (i % 2 == 1 && str[i] == 'B')) {
					//baba
					cnt1++;
				} 
				if ((i % 2 == 0 && str[i] == 'B') || (i % 2 == 1 && str[i] == 'A')) {
					//abab
					cnt2++;
				}
			}
			
			StringBuilder sb = new StringBuilder();
			if (cnt1 <= cnt2) {
				out.println(cnt1);
				for (int i = 0; i < str.length; i++) {
					if (i % 2 == 0) {
						sb.append('B');
					} else {
						sb.append('A');
					}
				}
			} else {
				out.println(cnt2);
				for (int i = 0; i < str.length; i++) {
					if (i % 2 == 0) {
						sb.append('A');
					} else {
						sb.append('B');
					}
				}
			}
			out.println(sb.toString());
		} else {
			int count = 0;
			for (int i = 1; i < str.length; i++) {
				if (str[i] == str[i - 1]) {
					int p = str[i] - 'A';
					int next = 27;
					if (i != str.length - 1) {
						next = str[i + 1] - 'A';
					}
					p = (p + 1) % k;
					if (p == next) {
						p = (p + 1) % k;
					}
					str[i] = (char)(p + 'A');
					count++;
				}
			}
			out.println(count);
			out.println(str);
		}
	}
	
	static void asserT(boolean e) {
		if (!e) {
			throw new Error();
		}
	}
	
	
	public void run() {
		in = new Scanner(System.in);
		out = new PrintWriter(System.out);
		
		try {
			solve();
		} finally {
			out.close();
		}
	}
	
	public static void main(String[] args) {
		new Main().run();
	}

}