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 ColorStripe {
	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(f.readLine());
		int n = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken());
		String str = f.readLine();
		int[][] dp = new int[n][k];
		int[][] dp2 = new int[n][k];
		Arrays.fill(dp[0], 1);
		dp[0][str.charAt(0)-'A'] = 0;
		for (int i = 1; i < n; i++) {
			int min = 0;
			for (int l = 0; l < k; l++)
				if (dp[i-1][l] < dp[i-1][min])
					min = l;
			for (int j = 0; j < k; j++)
				if (j != min) {
					dp[i][j] = dp[i-1][min] + (str.charAt(i)-'A'==j?0:1);
					dp2[i][j] = min;
				}
			int min2 = (min+1)%k;
			for (int j = 0; j < k; j++)
				if (j != min)
					if (dp[i-1][j] < dp[i-1][min2])
						min2 = j;
			dp[i][min] = dp[i-1][min2] + (str.charAt(i)-'A'==min?0:1);
			dp2[i][min] = min2;
		}
		int min = 0;
		for (int j = 0; j < k; j++)
			if (dp[n-1][j] < dp[n-1][min])
				min = j;
		System.out.println(dp[n-1][min]);
		StringBuffer sb = new StringBuffer();
		sb.append((char)('A'+min));
		for (int i = n-1; i > 0; i--) {
			min = dp2[i][min];
			sb.append((char)('A'+min));
		}
		sb.reverse();
		System.out.println(sb);
	}
}