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 long long inf = 1e18;
const long long mod = 1e9 + 7;
const long long MOD = 998244353;
const double EPS = 1e-8;
const double PI = acos(-1.0);
void solve() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  string s1 = s;
  if (k == 2) {
    string a = "", b = "";
    for (long long i = 0; i < n; i++) {
      if (i % 2) {
        a += 'A';
        b += 'B';
      } else {
        a += 'B';
        b += 'A';
      }
    }
    int a1 = 0, a2 = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] != s[i]) a1++;
      if (b[i] != s[i]) a2++;
    }
    if (a1 < a2) {
      cout << a1 << '\n' << a << '\n';
    } else {
      cout << a2 << '\n' << b << '\n';
    }
    return;
  }
  for (int i = 0; i < n; ++i) {
    if (i - 1 >= 0 && s1[i] == s1[i - 1]) {
      bool changed = 0;
      int p1 = s1[i - 1] - 'A';
      int p2 = s1[i] - 'A';
      int p3 = 27;
      if (i + 1 < n) {
        p3 = s1[i + 1] - 'A';
      }
      for (int j = 0; j < k; ++j) {
        if (j != p2 && j != p3) {
          s1[i] = 'A' + j;
          changed = 1;
          break;
        }
      }
      if (!changed) {
        int p4 = 28;
        if (i - 2 >= 0) {
          p4 = s1[i - 2] - 'A';
        }
        for (int j = 0; j < k; ++j) {
          if (j != p2 && j != p4) {
            s1[i - 1] = 'A' + j;
            changed = 1;
            break;
          }
        }
      }
    }
  }
  int ans = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] != s1[i]) ans++;
  }
  cout << ans << '\n' << s1 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}