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;
const int MAXN = 500100;
int n, k;
char s[MAXN];
inline int min(int x, int y) {
  if (x < y) return x;
  return y;
}
void read() {
  scanf("%d %d", &n, &k);
  scanf("%s", &s);
}
void solve() {
  int i, j;
  if (k == 2) {
    int a = 0, b = 0;
    char ca = 'A', cb = 'B';
    for (i = 0; i < n; ++i) {
      if (ca != s[i]) a++;
      if (cb != s[i]) b++;
      ca = (ca == 'A' ? 'B' : 'A');
      cb = (cb == 'B' ? 'A' : 'B');
    }
    if (a <= b) {
      printf("%d\n", min(a, b));
      for (i = 0; i < n; ++i) {
        if ((i + 1) % 2 == 1)
          printf("A");
        else
          printf("B");
      }
    } else {
      printf("%d\n", min(a, b));
      for (i = 0; i < n; ++i) {
        if ((i + 1) % 2 == 1)
          printf("B");
        else
          printf("A");
      }
    }
    printf("\n");
  } else {
    int cnt = 0;
    for (i = 1; i < n; ++i) {
      if (s[i - 1] == s[i]) {
        cnt++;
        for (j = 1; j <= k; ++j) {
          if (j + 'A' - 1 != s[i - 1] && j + 'A' - 1 != s[i + 1])
            s[i] = j + 'A' - 1;
        }
      }
    }
    printf("%d\n", cnt);
    for (i = 0; i < n; ++i) {
      printf("%c", s[i]);
    }
    printf("\n");
  }
}
int main() {
  read();
  solve();
  return 0;
}