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 PYTHON3):

Solution:
n,k=map(int,input().split())
s=input()
temp=[]
for i in range(len(s)):
    temp.append(s[i])
ans=[]
tans=[]
for i in range(len(s)):
    ans.append(s[i])
    tans.append(s[i])
if(k==2):
    c1=0
    count=0
    for i in range(len(ans)):
        if(i%2==0):
            if(ans[i]=='B'):
                ans[i]='A'
                c1+=1
        else:
            if(ans[i]=='A'):
                ans[i]='B'
                c1+=1
    for i in range(len(tans)):
        if(i%2==0):
            if(tans[i]=='A'):
                tans[i]='B'
                count+=1
        else:
            if(tans[i]=='B'):
                tans[i]='A'
                count+=1
    if(count>c1):
        print(c1)
        print(''.join(map(str,ans)))
    else:
        print(count)
        print(''.join(map(str,tans)))
        

    
  
   
   
  
                   
    
   
    
    
else:
    for i in range(1,len(ans)):
        if(ans[i-1]==ans[i]):
            if(ans[i]=='A'):
                if(i+1<len(ans)):
                    if(ans[i+1]=='B'):
                        ans[i]='C'
                    else:
                        ans[i]='B'
                else:
                    ans[i]='B'
                
               
                
            else:
               if(i+1<len(ans)):
                   if(ans[i+1]=='A'):
                       if(ans[i]=='B'):
                           ans[i]='C'
                       else:
                           ans[i]='B'
                   else:
                       ans[i]='A'
               else:
                   ans[i]='A'
    count=0
    for i in range(len(temp)):
        if(temp[i]!=ans[i]):
            count+=1
    print(count)
    print(''.join(map(str,ans)))