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;
template <class T>
inline T bigmod(T b, T p, T m) {
  T ret;
  if (p == 0) return 1;
  if (p & 1) {
    ret = (bigmod(b, p / 2, m) % m);
    return ((b % m) * ret * ret) % m;
  } else {
    ret = (bigmod(b, p / 2, m) % m);
    return (ret * ret) % m;
  }
}
int dx4[] = {1, -1, 0, 0};
int dy4[] = {0, 0, 1, -1};
int dx6[] = {0, 0, 1, -1, 0, 0};
int dy6[] = {1, -1, 0, 0, 0, 0};
int dz6[] = {0, 0, 0, 0, 1, -1};
int dx8[] = {1, -1, 0, 0, -1, 1, -1, 1};
int dy8[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dkx8[] = {-1, 1, -1, 1, -2, -2, 2, 2};
int dky8[] = {2, 2, -2, -2, 1, -1, 1, -1};
int tc = 1;
const double eps = 1e-9;
const double pi = acos(-1.0);
const long long int mx = 5e5;
const long long int mod = 1e9 + 7;
string str;
int n, k;
int main() {
  int i, j, cnt, a, b;
  ios::sync_with_stdio(0);
  while (cin >> n >> k >> str) {
    cnt = 0;
    if (k == 2) {
      a = 0;
      b = 0;
      for (i = 0; i < n; i++) {
        if (i % 2 == 0) {
          if (str[i] == 'B') a++;
          if (str[i] == 'A') b++;
        } else {
          if (str[i] == 'A') a++;
          if (str[i] == 'B') b++;
        }
      }
      if (a < b) {
        cout << a << "\n";
        for (i = 0; i < n; i++) cout << ((i % 2 == 0) ? 'A' : 'B');
        cout << "\n";
      } else {
        cout << b << "\n";
        for (i = 0; i < n; i++) cout << ((i % 2 != 0) ? 'A' : 'B');
        cout << "\n";
      }
      continue;
    }
    for (i = 0; i < n - 1; i++) {
      if (str[i] == str[i + 1] && str[i] == str[i + 2]) {
        for (j = 0; j < k; j++) {
          if (str[i + 1] != (j + 'A')) {
            str[i + 1] = (j + 'A');
            cnt++;
            break;
          }
        }
      } else if (str[i] == str[i + 1]) {
        for (j = 0; j < k; j++) {
          if (i > 0 && str[i - 1] != (j + 'A') && str[i] != (j + 'A')) {
            str[i] = (j + 'A');
            cnt++;
            break;
          } else if (i == 0 && str[i] != (j + 'A')) {
            str[i] = (j + 'A');
            cnt++;
            break;
          }
        }
      }
    }
    cout << cnt << "\n";
    cout << str << "\n";
  }
  return 0;
}