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

Solution:
def start():
    n, k = map(int, raw_input().split())
    colors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    S = raw_input()
    L = list(S)
    repaints = 0
    conflictPoint = -1
    for i in xrange(len(S)-1):
        if S[i] == S[i+1]:
            conflictPoint = i
            break
    if k == 2:
        if conflictPoint == -1:
            print repaints
            print S
        else:
            # 2 cases -
            L1, L2 = list(L), L[conflictPoint:]
            rPaints1, rPaints2 = 0, 0
            L1[conflictPoint] = "A" if L1[conflictPoint] == "B" else "B"
            rPaints1 += 1
            for i in xrange(conflictPoint+1,len(L1)):
                if L1[i] == L1[i-1]:
                    L1[i] = "A" if L1[i] == "B" else "B"
                    rPaints1 += 1
            for i in xrange(conflictPoint-1, -1, -1):
                if L1[i] == L1[i+1]:
                    L1[i] = "A" if L1[i] == "B" else "B"
                    rPaints1 += 1
            for i in xrange(1, len(L2)):
                if L2[i] == L2[i-1]:
                    L2[i] = "A" if L2[i] == "B" else "B"
                    rPaints2 += 1
            if rPaints1 <= rPaints2:
                print rPaints1
                print "".join(L1)
            else:
                print rPaints2
                print "".join(L[:conflictPoint]+L2)
        return
    if conflictPoint == -1:
        print repaints
        print S
        return
    else:
        repaints = 0
        for index in xrange(conflictPoint+1,len(L)-1):
            if L[index] == L[index-1]:
                for x in xrange(k):
                    if colors[x] != L[index-1] and colors[x] != L[index+1]:
                        L[index] = colors[x]
                        repaints += 1
                        break
        if L[-1] == L[-2]:
            repaints += 1
            for x in xrange(k):
                if colors[x] != L[-2]:
                    L[-1] = colors[x]
        print repaints
        print "".join(L)
    

start()