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;
void hinataVSsakura(void);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) hinataVSsakura();
  return 0;
}
struct jutsu {
  long long a, b, c;
};
bool jutsu_compare(jutsu s1, jutsu s2) {
  if (abs(s1.a - s2.a) >= abs(s1.b - s2.b))
    return s1.a > s2.a;
  else
    return s1.b < s2.b;
}
long long ncr(long long n, long long k) {
  long long res = 1;
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long max(long long a, long long b) { return (a > b) ? a : b; }
long long min(long long a, long long b) { return (a < b) ? a : b; }
long long index(vector<long long> arr, long long val) {
  auto it = find((arr).begin(), (arr).end(), val);
  if (it != arr.end()) {
    long long ind = it - arr.begin();
    return ind;
  } else
    return -1;
}
void hinataVSsakura(void) {
  long long n, k;
  cin >> n >> k;
  string s, s1, s2;
  cin >> s;
  long long cnt = 0;
  if (k == 2) {
    for (long long i = 0; i < n; ++i) {
      if (i & 1) {
        s1 += 'A';
        s2 += 'B';
      } else {
        s1 += 'B';
        s2 += 'A';
      }
    }
    long long c1 = 0, c2 = 0;
    for (long long i = 0; i < n; ++i) {
      if (s[i] != s1[i]) c1++;
      if (s[i] != s2[i]) c2++;
    }
    if (c1 > c2) {
      cout << c2 << endl;
      cout << s2 << endl;
    } else {
      cout << c1 << endl;
      cout << s1 << endl;
    }
  } else {
    for (long long i = 1; i < n; ++i) {
      if (s[i] == s[i - 1]) {
        long long j = 0;
        while (j < k) {
          if ((i == n - 1) && ((j + 'A') != s[i - 1])) {
            cnt++;
            s[i] = j + 'A';
            break;
          } else if ((j + 'A' != s[i - 1]) && ((j + 'A') != s[i + 1])) {
            cnt++;
            s[i] = j + 'A';
            break;
          }
          j++;
        }
      }
    }
    cout << cnt << endl;
    cout << s << endl;
  }
}