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

Solution:
#include <bits/stdc++.h>
using namespace std;
char c[500005], t1[500005], t2[500005];
int main() {
  long long n, i, j, k, cnt = 0, temp1 = 0, temp2 = 0;
  cin >> n >> k;
  bool done[k + 1];
  for (i = 65; i < 65 + k; i++) done[i - 65] = false;
  for (i = 0; i < n; i++) cin >> c[i];
  if (k == 2) {
    for (i = 0; i < n; i += 2) {
      t1[i] = 'A';
      if (c[i] != t1[i]) temp1++;
    }
    for (i = 1; i < n; i += 2) {
      t1[i] = 'B';
      if (c[i] != t1[i]) temp1++;
    }
    for (i = 0; i < n; i += 2) {
      t2[i] = 'B';
      if (c[i] != t2[i]) temp2++;
    }
    for (i = 1; i < n; i += 2) {
      t2[i] = 'A';
      if (c[i] != t2[i]) temp2++;
    }
    if (temp1 < temp2) {
      cout << temp1 << "\n";
      for (i = 0; i < n; i++) cout << t1[i];
    } else {
      cout << temp2 << "\n";
      for (i = 0; i < n; i++) cout << t2[i];
    }
    return 0;
  }
  i = 1;
  while (i < n) {
    if (c[i] != c[i - 1])
      i++;
    else {
      if (i == n - 1) {
        if (c[i - 1] == 'A')
          c[i] = 'B';
        else
          c[i] = 'A';
        cnt++;
        break;
      } else {
        for (j = 65; j < 65 + k; j++) done[j - 65] = false;
        done[c[i - 1] - 'A'] = true;
        done[c[i + 1] - 'A'] = true;
        for (j = 65; j < 65 + k; j++) {
          if (!done[j - 65]) {
            c[i] = j;
            break;
          }
        }
      }
      i++;
      cnt++;
    }
  }
  cout << cnt << "\n";
  for (i = 0; i < n; i++) cout << c[i];
  return 0;
}