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 boost() {
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long k;
void change(char a, char b, char &c) {
  for (char i = 'A'; i <= 'Z'; i++) {
    if (i != a && i != b) {
      c = i;
      return;
    }
  }
}
int main() {
  boost();
  long long n;
  cin >> n >> k;
  string s;
  cin >> s;
  long long ans = 0;
  if (k == 2) {
    string s1;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0)
        s1 += 'A';
      else
        s1 += 'B';
    }
    string s2;
    for (int i = 0; i < n; i++) {
      if (i % 2 != 0)
        s2 += 'A';
      else
        s2 += 'B';
    }
    int diff1 = 0, diff2 = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] != s1[i]) diff1++;
      if (s[i] != s2[i]) diff2++;
    }
    if (diff1 < diff2) {
      cout << diff1 << "\n";
      cout << s1 << "\n";
    } else {
      cout << diff2 << "\n";
      cout << s2 << "\n";
    }
    return 0;
  }
  vector<pair<int, int> > single;
  for (int i = 0; i < n; i++) {
    int a = i, b = i;
    for (int j = i + 1; j < n; j++) {
      if (s[i] == s[j]) {
        b = j;
        if (j == n - 1) {
          i = j;
        }
      } else {
        i = j - 1;
        break;
      }
    }
    if (b > a) {
      single.emplace_back(a, b);
    }
  }
  for (int i = 0; i < single.size(); i++) {
    int sz = single[i].second - single[i].first + 1;
    int fir = single[i].first;
    int sec = single[i].second;
    if (sz % 2 != 0) {
      char to = (s[fir] == 'A' ? 'B' : 'A');
      for (int j = fir + 1; j < sec; j++) {
        s[j] = to;
        ++ans;
        ++j;
      }
    } else {
      if (sec < n - 1) {
        char to;
        for (char t = 'A'; t <= 'C'; t++) {
          if (t != s[fir] && t != s[sec + 1]) {
            to = t;
            break;
          }
        }
        for (int j = fir + 1; j <= sec; j++) {
          s[j] = to;
          ++ans;
          ++j;
        }
      } else {
        char to = (s[fir] == 'A' ? 'B' : 'A');
        for (int j = fir + 1; j <= sec; j++) {
          s[j] = to;
          ++ans;
          ++j;
        }
      }
    }
  }
  cout << ans << "\n";
  cout << s << "\n";
}