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.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Alex
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out){
	    int n = in.ri(), k = in.ri();
	    String input = in.next();
	    if (k == 2) { solve2(input, out); return;}
	    solverest(input, out);
    }
	private void solverest(String input, OutputWriter out){
		char[] ca = input.toCharArray();
		int count = 0;
		for(int i = 1; i < ca.length - 1; i++) {
			if (ca[i] == ca[i-1] && ca[i] == ca[i+1]){
				ca[i] = convert(ca[i-1], ca[i+1]);
				count++;
			}
		}
		for(int i = 0; i < ca.length; i++) {
			if ((i > 0 && ca[i] == ca[i-1]) || (i < ca.length - 1 && ca[i] == ca[i+1])){
				ca[i] = convert(i > 0 ? ca[i-1] : '?', i < ca.length - 1 ? ca[i+1] : '?');
				count++;
			}
		}
		out.printLine(count);
		out.printLine(new String(ca));
	}
	private char convert(char a, char b){
		if ('A' != a && 'A' != b) return 'A';
		if ('B' != a && 'B' != b) return 'B';
		if('C' != a && 'C' != b) return 'C';
		throw new RuntimeException();
	}
	private void solve2(String input, OutputWriter out){
		char[] ca1 = input.toCharArray();
		int count1 = 0;
		for(int i = 0; i < ca1.length; i++)  {
			if (i % 2 == 0 && ca1[i] == 'A'){count1++; ca1[i] = 'B';}
			if (i % 2 == 1 && ca1[i] == 'B'){count1++; ca1[i] = 'A';}
		}
		char[] ca2 = input.toCharArray();
		int count2 = 0;
		for(int i = 0; i < ca2.length; i++)  {
			if (i % 2 == 1 && ca2[i] == 'A'){count2++; ca2[i] = 'B';}
			if (i % 2 == 0 && ca2[i] == 'B'){count2++; ca2[i] = 'A';}
		}
		if (count1 < count2){
			out.printLine(count1);
			out.printLine(new String(ca1));
		}
		else{
			out.printLine(count2);
			out.printLine(new String(ca2));
		}
	}
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}
	public int ri(){
		return readInt();
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			if (Character.isValidCodePoint(c))
				res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
	public String next() {
		return readString();
	}
	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}
	public void close() {
		writer.close();
	}
	public void printLine(int i) {
		writer.println(i);
	}

}