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 lol
{
	public static char r(char a,char b,int k)
	{
		for(int h=0;h<k;h++)
		{
			if(a-'A'!=h && b-'A'!=h)
				return (char)(h+'A');
		}
		return 'A';
	}
	public static int calc(int k,char[] str,int changes)
	{
		for(int h=0;h<str.length;h+=1)
		{
			if(h+2<str.length && str[h]==str[h+1] && str[h+1]==str[h+2])
			{
				str[h+1]=r(str[h],str[h+2],k);
				changes++;
			}
			else if(h+2<str.length && str[h]==str[h+1])
			{
				str[h+1]=r(str[h],str[h+2],k);
				changes++;
			}
			else if(h+1<str.length && str[h]==str[h+1])
			{
				str[h+1]=r(str[h],str[h],k);
				changes++;
			}
		}
		return changes;
	}
	
	public static void main(String[] args) throws IOException
	{
		Scanner s = new Scanner(System.in);
		 int n = s.nextInt();
		 int k = s.nextInt();
		char[] str = s.next().toCharArray();
		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
		int changes=0;
		int changes2=0;
		if(k==2)
		{
			for(int h=0;h<n;h++)
			{
				if(h%2==0)
				{
					if(str[h]!='A')
						changes++;
					else
						changes2++;
				}
				else
				{
					if(str[h]!='B')
						changes++;
					else
						changes2++;
				}
			}
			
			changes=Math.min(changes,changes2);
			out.write(Integer.toString(changes)+"\n");
			char st='A';
			if(changes==changes2)
				st='B';
			
			for(int h=0;h<n;h++)
			{
				out.write(st);
				st=st=='A'?'B':'A';
			}
			out.flush();
			out.close();
			return;
		}
		
		changes = calc(k,str,changes);
		out.write(Integer.toString(changes)+"\n");
		for(int h=0;h<n;h++)
			out.write(str[h]);
		out.flush();
		out.close();
	}
}