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 view_arr(int a[], int n) {
  for (int i = 0; i <= n; i++) {
    if (!i)
      printf("%d", a[i]);
    else
      printf(" %d", a[i]);
  }
  puts("");
}
const char ch[4] = {'$', 'A', 'B', 'C'};
void deal2(char str[], int k, int &Min) {
  int len = strlen(str);
  if (k == 2) {
    int cnt1(0), cnt2(0);
    for (int i = 0; i <= len - 1; ++i) {
      if ((i & 1) && str[i] != 'A')
        cnt1++;
      else if (!(i & 1) && str[i] != 'B')
        cnt1++;
      if ((i & 1) && str[i] != 'B')
        cnt2++;
      else if (!(i & 1) && str[i] != 'A')
        cnt2++;
    }
    if (cnt1 <= cnt2) {
      Min = cnt1;
      for (int i = 0; i <= len - 1; ++i) {
        if (i & 1)
          str[i] = 'A';
        else
          str[i] = 'B';
      }
    } else {
      Min = cnt2;
      for (int i = 0; i <= len - 1; ++i)
        if (i & 1)
          str[i] = 'B';
        else
          str[i] = 'A';
    }
  } else {
    for (int i = 1; i <= len - 1; ++i) {
      if (str[i] == str[i - 1]) {
        Min++;
        for (int j = 1; j <= 3; ++j) {
          if (str[i - 1] != ch[j] && (i == len - 1 || str[i + 1] != ch[j]))
            str[i] = ch[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;
  }
  view_arr(t1, 10);
  view_arr(t2, 10);
}
char str[MAXN];
int res[MAXN];
int main() {
  int len, k;
  while (scanf("%d %d", &len, &k) == 2) {
    scanf("%s", str);
    int Min = 0;
    deal2(str, k, Min);
    printf("%d\n", Min);
    printf("%s\n", str);
  }
  return 0;
}