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;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
const int nax = 5e5 + 7;
const int mod = 1e9 + 7;
const int inf = numeric_limits<int>::max();
int n, m;
void test() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  pair<int, int> dp[n + 1][k];
  for (int i = 0; i < n + 1; i++) {
    for (int j = 0; j < k; j++) {
      dp[i][j] = {inf, inf};
    }
  }
  for (int i = 0; i < k; i++) {
    dp[0][i] = {0, -2};
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < k; j++) {
      for (int r = 0; r < k; r++) {
        if (r == j) continue;
        int x = (s[i - 1] - 'A' != r) + dp[i - 1][r].first;
        if (dp[i][j].first > x) {
          dp[i][j].second = r;
          dp[i][j].first = x;
        }
      }
    }
  }
  int tr = inf, ans = inf;
  for (int i = 0; i < k; i++) {
    if (ans > dp[n][i].first) {
      debug() << dp[n][i];
      ans = dp[n][i].first;
      tr = dp[n][i].second;
    }
  }
  string an(1, char(tr + 'A'));
  for (int i = n - 1; i > 0; i--) {
    an += (char)(dp[i][tr].second + 'A');
    tr = dp[i][tr].second;
  }
  reverse(an.begin(), an.end());
  cout << ans << '\n' << an;
}
signed main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  while (T--) {
    test();
    cout << "\n";
  }
  return 0;
}