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;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  string s, s1 = "", s2 = "";
  cin >> s;
  if (k == 2) {
    long long cnt = 0, cnt1 = 0, cnt2 = 0;
    for (long long i = 0; i < n; i++) {
      s1 += (cnt % 2 == 0 ? "A" : "B");
      s2 += (cnt % 2 == 0 ? "B" : "A");
      cnt++;
      cnt1 += (s1[i] != s[i] ? 1 : 0);
      cnt2 += (s2[i] != s[i] ? 1 : 0);
    }
    cout << min(cnt1, cnt2) << endl;
    if (cnt1 > cnt2)
      cout << s2;
    else
      cout << s1;
  } else {
    long long cnt = 1;
    vector<long long> v;
    char prev;
    for (long long i = 0; i < n; i++) {
      if (i == 0)
        prev = s[i];
      else if (prev == s[i])
        cnt++;
      else {
        v.push_back(cnt);
        cnt = 1;
        prev = s[i];
      }
    }
    v.push_back(cnt);
    long long j = 0, ans = 0;
    for (long long i = 0; i < v.size(); i++) {
      long long x = v[i];
      if (x % 2 == 0) {
        long long y = s[j] - 'A';
        char use;
        if (j == 0) {
          if (y == 0)
            use = 'B';
          else
            use = 'A';
        } else {
          if ((y == 0 && s[j - 1] - 'A' == 1) ||
              (s[j - 1] - 'A' == 0 && y == 1))
            use = 'C';
          else if (y == 0 || (s[j - 1] - 'A' == 0))
            use = 'B';
          else
            use = 'A';
        }
        for (long long l = j; l < j + x; l += 2) {
          s[l] = use;
          ans++;
        }
        j += x;
      } else {
        if (x == 1) {
          j++;
        } else {
          char c = s[j], use;
          if (c == 'A')
            use = 'B';
          else
            use = 'A';
          for (long long l = j + 1; l < j + x; l += 2) {
            s[l] = use;
            ans++;
          }
          j += x;
        }
      }
    }
    cout << ans << endl;
    cout << s;
  }
}