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 = 500005;
int t1[MAXN], t2[MAXN];
inline int get_ind(char ch) { return ch - 'A' + 1; }
void deal(char str[], int k, int res[], int &Min) {
  int len = strlen(str);
  if (k == 2) {
    int cnt1 = 0, cnt2 = 0;
    for (int i = 0; i <= len - 1; ++i) {
      if (get_ind(str[i]) != t1[i]) cnt1++;
      if (get_ind(str[i]) != t2[i]) cnt2++;
    }
    if (cnt1 >= cnt2) {
      Min = cnt2;
      memcpy(res, t2, sizeof(t2));
    } else {
      Min = cnt1;
      memcpy(res, t1, sizeof(t1));
    }
  } else {
    for (int i = 0; i <= len - 1; ++i) res[i] = get_ind(str[i]);
    for (int i = 1; i <= len - 1; ++i) {
      if (res[i] == res[i - 1]) {
        Min++;
        for (int j = 1; j <= 3; ++j) {
          if (i != len - 1) {
            if (j != get_ind(str[i - 1]) && j != get_ind(str[i + 1]))
              res[i] = j;
          } else {
            if (j != get_ind(str[i - 1])) res[i] = j;
          }
        }
      }
    }
  }
}
void pre_init() {
  int t = 0;
  for (int i = 0; i < MAXN; i++) {
    t1[i] = t + 1;
    t2[i] = (1 - t) + 1;
    t = 1 - t;
  }
}
char str[MAXN];
int res[MAXN];
int main() {
  int len, k;
  pre_init();
  while (scanf("%d %d", &len, &k) == 2) {
    scanf("%s", str);
    int Min = 0;
    deal(str, k, res, Min);
    printf("%d\n", Min);
    for (int i = 0; i <= len - 1; ++i) printf("%c", res[i] - 1 + 'A');
    puts("");
  }
  return 0;
}