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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("O2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int maxn = 5e5 + 10;
int n, k;
int a[maxn], dp[maxn][30];
int to[maxn][30], to2[maxn][30];
string str;
int ans(int idx, int prev) {
  if (idx > n) return 0;
  if (dp[idx][prev] != -1) return dp[idx][prev];
  int ret = 1e9 + 7;
  for (int i = 1; i <= k; i++) {
    if (i == prev) continue;
    int now = ans(idx + 1, i) + (i != a[idx]);
    if (now < ret) {
      ret = now;
      to[idx][prev] = i;
      to2[idx][prev] = idx + 1;
    }
  }
  return dp[idx][prev] = ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  cin >> str;
  for (int i = 1; i <= n; i++) a[i] = str[i - 1] - 'A' + 1;
  memset(dp, -1, sizeof dp);
  cout << ans(1, 0) << endl;
  int p = to[1][0], q = to2[1][0], pp;
  char ch;
  while (p) {
    ch = p + 'A' - 1;
    cout << ch;
    if (q > n) break;
    pp = p;
    p = to[q][p];
    q = to2[q][pp];
  }
  return 0;
}