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;
inline int inp() {
  int n = 0, s = 1;
  char p = getchar();
  if (p == '-') s = -1;
  while ((p < '0' || p > '9') && p != EOF) p = getchar();
  while (p >= '0' && p <= '9') {
    n = (n << 3) + (n << 1) + (p - '0');
    p = getchar();
  };
  return n * s;
}
char a[5 * 100005];
int c = 0, n, k, j, l;
stack<int> s;
void rec(int i) {
  s.push(i);
  while (!s.empty()) {
    int i = s.top();
    s.pop();
    if (i > n - 1 || i < 0) continue;
    if (i == 0) {
      for (j = 0; j < k; j++)
        if (a[i + 1] != j + 'A') {
          a[i] = j + 'A';
          c++;
          break;
        }
    }
    if (a[i] == a[i - 1]) {
      l = 0;
      for (j = 0; j < k; j++)
        if (a[i + 1] != j + 'A' && a[i - 1] != j + 'A') {
          a[i] = j + 'A';
          c++;
          l = 1;
          break;
        }
      if (l == 0)
        s.push(i - 1);
      else
        s.push(i + 1);
    } else
      s.push(i + 1);
  }
}
int main() {
  int i, j, p1 = 0, p2 = 0;
  n = inp();
  k = inp();
  scanf("%s", a);
  if (k == 2) {
    for (i = 0; i < n; i++) {
      if (a[i] - 'A' != i % 2)
        p1++;
      else
        p2++;
    }
    cout << min(p1, p2) << endl;
    if (p1 < p2)
      for (i = 0; i < n; i++) cout << char('A' + i % 2);
    else
      for (i = 0; i < n; i++) cout << char('A' + 1 - (i % 2));
  } else {
    rec(1);
    printf("%d\n%s\n", c, a);
  }
  return 0;
}