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;
const int mod = 1e9 + 7;
double rast(int x1, int y1, int x2, int y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
int dp[500005][30];
int pre[500005][30];
int a[500005];
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    char c;
    cin >> c;
    a[i] = (c - 'A');
  }
  for (int i = 0; i < k; i++) dp[0][i] = 1;
  dp[0][a[0]] = 0;
  int id1 = 0, c1 = a[0], id2 = 1, c2 = (a[0] + 1) % k;
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < k; j++) {
      if (j == c1) {
        dp[i][j] = id2 + (a[i] != j ? 1 : 0);
        pre[i][j] = c2;
      } else {
        dp[i][j] = id1 + (a[i] != j ? 1 : 0);
        pre[i][j] = c1;
      }
    }
    id1 = id2 = 2e9;
    for (int j = 0; j < k; j++) {
      if (dp[i][j] < id1) {
        id2 = id1;
        c2 = c1;
        id1 = dp[i][j];
        c1 = j;
      } else if (dp[i][j] < id2) {
        id2 = dp[i][j];
        c2 = j;
      }
    }
  }
  int ans = 2e9, pos;
  for (int i = 0; i < k; i++) {
    if (dp[n - 1][i] < ans) {
      ans = dp[n - 1][i];
      pos = i;
    }
  }
  cout << ans << '\n';
  string t;
  for (int i = n - 1; i >= 0; i--) {
    t += pos + 'A';
    pos = pre[i][pos];
  }
  reverse(t.begin(), t.end());
  cout << t;
}