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 abs(int x) {
  if (x < 0)
    return -x;
  else
    return x;
}
char allowed(char x, char y) {
  char first, second;
  if (x < y) {
    first = x;
    second = y;
  } else {
    first = y;
    second = x;
  }
  if (first == 'A' && second == 'B')
    return 'C';
  else if (first != 'A')
    return 'A';
  else
    return 'B';
}
int main() {
  int n, k;
  cin >> n >> k;
  char str[n + 1];
  cin >> str;
  if (k == 2) {
    int c1, c2;
    c1 = 0;
    c2 = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        c1 += abs(int(str[i]) - int('A'));
        c2 += abs(int(str[i]) - int('B'));
      } else {
        c1 += abs(int(str[i]) - int('B'));
        c2 += abs(int(str[i]) - int('A'));
      }
    }
    if (c1 < c2) {
      cout << c1 << "\n";
      for (int i = 0; i < n; i++) {
        if (i % 2 == 0)
          cout << 'A';
        else
          cout << 'B';
      }
    } else {
      cout << c2 << "\n";
      for (int i = 0; i < n; i++) {
        if (i % 2 == 0)
          cout << 'B';
        else
          cout << 'A';
      }
    }
  } else {
    char dp[n + 1];
    int c = 0;
    dp[0] = str[0];
    for (int i = 1; i < n; i++) {
      if (str[i] == dp[i - 1]) {
        if (str[i - 1] != dp[i - 1]) {
          if (i > 1)
            dp[i - 1] = allowed(str[i], dp[i - 2]);
          else
            dp[i - 1] = allowed(str[i], str[i]);
          dp[i] = str[i];
        } else {
          dp[i] = allowed(str[i - 1], str[i - 1]);
          c += 1;
        }
      } else
        dp[i] = str[i];
    }
    cout << c << "\n";
    for (int i = 0; i < n; i++) cout << dp[i];
  }
  return 0;
}