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;
long long mod = 10000000000;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long modularExp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = ((x % mod) * (x % mod)) % mod;
    n = n / 2;
  }
  return (result) % mod;
}
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  long long n, k;
  string s;
  long long i;
  cin >> n >> k >> s;
  if (k == 2) {
    long long cnt1 = 0, cnt2 = 0;
    string a, b;
    for (i = 0; i < n; i++) {
      if (i % 2 == 0) {
        a += 'A';
        b += 'B';
      } else if (i % 2 == 1) {
        a += 'B';
        b += 'A';
      }
    }
    for (i = 0; i < n; i++) {
      if (s[i] != a[i]) cnt1 += 1;
      if (s[i] != b[i]) cnt2 += 1;
    }
    cout << min(cnt1, cnt2) << endl;
    if (cnt1 <= cnt2)
      cout << a;
    else
      cout << b;
    return 0;
  }
  string ans = s;
  long long b = 0, e = 0;
  long long cnt = 0;
  while (1) {
    while (b < n - 1 && s[b] != s[b + 1]) b++;
    if (b >= n - 1) break;
    e = b + 1;
    while (e < n - 1 && s[e] == s[e + 1]) e++;
    if (e > n - 1) break;
    long long len = e - b + 1;
    if (len % 2 == 0) {
      char r;
      if (b == 0) {
        if (s[b] == 'A')
          r = 'B';
        else
          r = 'A';
      } else {
        set<char> st;
        st.insert(s[b]);
        st.insert(s[b - 1]);
        if (st.find('A') == st.end())
          r = 'A';
        else if (st.find('B') == st.end())
          r = 'B';
        else
          r = 'C';
      }
      for (i = b; i <= e; i += 2) ans[i] = r;
      cnt += len / 2;
    } else {
      char r;
      if (s[b] == 'A')
        r = 'B';
      else
        r = 'A';
      for (i = b + 1; i <= e; i += 2) ans[i] = r;
      cnt += len / 2;
    }
    b = e + 1;
  }
  cout << cnt << "\n";
  cout << ans;
}