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 const mod = 1000000009;
inline long long add(long long a, long long b) {
  return ((a % mod) + (b % mod) + mod) % mod;
}
inline long long mul(long long a, long long b) {
  return (((a % mod) * (b % mod)) % mod + mod) % mod;
}
inline long long sub(long long a, long long b) {
  return ((a % mod) - (b % mod) + mod) % mod;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
long long modInv(long long x) { return power(x, mod - 2, mod) % mod; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k;
  cin >> n >> k;
  string second;
  cin >> second;
  if (k == 2) {
    long long ans = 0;
    long long first = 0;
    string p;
    for (int i = 0; i < n; i++) {
      if (first == 0) {
        if (second[i] != 'A') ans++;
        p.push_back('A');
      } else {
        if (second[i] != 'B') ans++;
        p.push_back('B');
      }
      first = 1 - first;
    }
    long long ans2 = 0;
    string p2;
    first = 1;
    for (int i = 0; i < n; i++) {
      if (first == 0) {
        if (second[i] != 'A') ans2++;
        p2.push_back('A');
      } else {
        if (second[i] != 'B') ans2++;
        p2.push_back('B');
      }
      first = 1 - first;
    }
    if (ans < ans2) {
      cout << ans << endl << p << endl;
    } else {
      cout << ans2 << endl << p2 << endl;
    }
  } else {
    long long ans = 0;
    for (int i = 1; i < n; i++) {
      if (second[i] == second[i - 1]) {
        ans++;
        if (second[i - 1] != 'A' && second[i + 1] != 'A')
          second[i] = 'A';
        else if (second[i - 1] != 'B' && second[i + 1] != 'B')
          second[i] = 'B';
        else if (second[i - 1] != 'C' && second[i + 1] != 'C')
          second[i] = 'C';
      }
    }
    cout << ans << endl << second << endl;
  }
  return 0;
}