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 n, k;
string s;
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  cin >> n >> k;
  cin >> s;
  if (k == 2) {
    string s1 = "", s2 = "";
    for (int i = 0; i < s.size(); i++)
      if (i & 1)
        s1 += 'A', s2 += 'B';
      else
        s1 += 'B', s2 += 'A';
    int x = 0, y = 0;
    for (int i = 0; i < s.size(); i++)
      x += (s[i] == s1[i] ? 1 : 0), y += (s[i] == s2[i] ? 1 : 0);
    if (x > y)
      cout << s.size() - x << endl << s1 << endl;
    else
      cout << s.size() - y << endl << s2 << endl;
    return 0;
  }
  string h;
  int z = 1;
  map<int, char> mop;
  map<char, int> mops;
  for (char c = 'A'; c <= 'Z'; c++) {
    mop[z] = c, mops[c] = z, z++;
    if (z > k) break;
  }
  string t = s;
  int ans = 0;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == s[i + 1]) {
      h = s[i], h += s[i + 1];
      int f = i + 1;
      for (int j = i + 2; j < s.size(); j++) {
        if (s[j] != s[i]) break;
        f++;
        h += s[j];
      }
      char prev = s[i - 1], next = h[1];
      if (h.size() % 2 == 0)
        for (int j = 0; j < h.size(); j += 2) {
          for (__typeof((mops).begin()) it = (mops).begin(); it != (mops).end();
               it++)
            if (it->first != prev && it->first != next) {
              h[j] = it->first;
              prev = h[j + 1], next = h[j + 3];
              ans++;
              break;
            }
        }
      else {
        prev = h[0], next = h[2];
        for (int j = 1; j < h.size(); j += 2) {
          for (__typeof((mops).begin()) it = (mops).begin(); it != (mops).end();
               it++)
            if (it->first != prev && it->first != next) {
              h[j] = it->first;
              prev = h[j + 1];
              next = h[j + 3];
              ans++;
              break;
            }
        }
      }
      int n = 0;
      for (int j = i; j < f; j++) s[j] = h[n++];
      i = f - 1;
    }
  }
  cout << ans << endl;
  cout << s << endl;
  return 0;
}