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 MAX = 1e6 + 30;
const int mod = 1e9 + 7;
const double eps = 1e-7;
int main() {
  int n, k;
  cin >> n >> k;
  string second;
  cin >> second;
  int dp[n + 1][28];
  memset(dp, 0, sizeof(dp));
  for (int i = 0; i < 26; i++) {
    if (second[0] - 'A' != i) dp[0][i] = 1;
  }
  int par[n + 1][k + 9];
  memset(par, 0, sizeof(par));
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < k; j++) {
      dp[i][j] = INT_MAX;
      for (int p = 0; p < k; p++) {
        if (j != p) {
          int temp = second[i] - 'A' == j ? 0 : 1;
          int curans = dp[i - 1][p] + temp;
          if (dp[i][j] > curans) {
            dp[i][j] = curans;
            par[i][j] = p;
          }
        }
      }
    }
  }
  int mn = INT_MAX;
  string ans = "";
  int st = 0;
  for (int i = 0; i < k; i++) {
    if (mn > dp[n - 1][i]) {
      st = i;
      mn = dp[n - 1][i];
    }
  }
  cout << mn << "\n";
  for (int i = n - 1; i >= 0; i--) {
    ans += st + 'A';
    st = par[i][st];
  }
  reverse(ans.begin(), ans.end());
  cout << ans;
}