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;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using pill = pair<int, ll>;
using vvi = vector<vi>;
ll gcd(ll a, ll b) {
  ll t;
  while ((t = a % b) != 0) {
    a = b;
    b = t;
  }
  return b;
}
ll fast_exp(ll base, ll n, ll m) {
  if (n == 0) return 1;
  ll t = fast_exp(base, n / 2, m);
  if (n % 2 == 0)
    return (t * t) % m;
  else
    return (((t * t) % m) * base) % m;
}
bool is_set(int i, ll mask) { return (mask >> i) & 1; }
int count_bits(ll mask) {
  int ans = 0;
  for (int i = 0; i < 64; ++i)
    if (is_set(i, mask)) ++ans;
  return ans;
}
int first_bit(ll mask) {
  int i = 0;
  while (i < 64)
    if (is_set(i++, mask)) return i - 1;
  return -1;
}
int const N = 5 * 1e5;
int const inf = 1e6;
int dp[N + 1][26];
int bt[N + 1][26];
void print_ans(int i, int j) {
  if (i == 0) return;
  print_ans(i - 1, bt[i][j]);
  cout << static_cast<char>('A' + j);
}
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  s = " " + s;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < k; ++j) {
      dp[i][j] = inf;
      for (int l = 0; l < k; ++l) {
        if (l == j) continue;
        if (dp[i][j] > dp[i - 1][l] + 1)
          dp[i][j] = dp[i - 1][l] + 1, bt[i][j] = l;
      }
      if (s[i] == 'A' + j) dp[i][j]--;
    }
  }
  int ans = inf, lc = -1;
  for (int i = 0; i < k; ++i) {
    if (ans > dp[n][i]) ans = dp[n][i], lc = i;
  }
  cout << ans << "\n";
  print_ans(n, lc);
  cout << "\n";
  return 0;
}