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;
long long n, k;
string str;
long long segment(long long i) {
  if (i == n) return i - 1;
  if (str[i] != str[i + 1]) return i;
  return segment(i + 1);
}
long long func(string s1, string s2) {
  long long cnt = 0, i;
  for (i = 0; i < n; i++) {
    cnt += (s1[i] != s2[i]);
  }
  return cnt;
}
char change(long long i) {
  set<char> st;
  set<char>::iterator itr;
  long long j;
  for (j = 0; j < k; j++) {
    st.insert(char('A' + j));
  }
  st.erase(char(str[i - 1]));
  if (i + 1 < n) st.erase(char(str[i + 1]));
  itr = st.begin();
  st.insert(char(str[i - 1]));
  if (i + 1 < n) st.insert(char(str[i + 1]));
  return *itr;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long m, a, i, b, j, t, x, y, z, tc, u, v, w;
  cin >> n >> k >> str;
  string ans = "", t2 = "", t3 = "";
  if (k == 2) {
    for (i = 0; i < n / 2; i++) {
      t2 += "AB";
      t3 += "BA";
    }
    if (n % 2 == 1) {
      t2 += "A";
      t3 += "B";
    }
    u = func(str, t2);
    v = func(str, t3);
    if (u <= v) {
      cout << u << endl << t2 << endl;
    } else {
      cout << v << endl << t3 << endl;
    }
    return 0;
  }
  long long cnt = 0;
  for (i = 0; i < n; i++) {
    long long tt = segment(i);
    z = tt - i + 1;
    for (j = i; j <= tt; j++) {
      if (i % 2 == j % 2) {
        ans += str[j];
      } else {
        ans += change(j);
        cnt++;
      }
    }
    i = tt;
  }
  cout << cnt << endl << ans << endl;
}