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 long long MAX = 1e9 + 1;
const double pi = 3.1415926535897932384626433832;
const long long M = 2e18 + 7;
long long bis(long long a[], long long l, long long r, long long x) {
  while (l <= r) {
    long long m = l + (r - l) / 2;
    if (a[m] == x) return m;
    if (a[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
void addEdge(vector<long long> adj[], long long u, long long v) {
  adj[u].push_back(v);
  adj[v].push_back(u);
}
void DFSUtil(long long u, vector<long long> adj[], vector<bool> &visited) {
  visited[u] = true;
  for (long long i = 0; i < adj[u].size(); i++)
    if (visited[adj[u][i]] == false) DFSUtil(adj[u][i], adj, visited);
}
void DFS(vector<long long> adj[], long long V) {
  vector<bool> visited(V, false);
  for (long long u = 0; u < V; u++)
    if (visited[u] == false) DFSUtil(u, adj, visited);
}
void addEdge(vector<pair<long long, long long> > adj[], long long u,
             long long v, long long wt) {
  adj[u].push_back(make_pair(v, wt));
  adj[v].push_back(make_pair(u, wt));
}
long long gcd(long long x, long long y) {
  if (x == 0)
    return y;
  else
    return gcd(y % x, x);
}
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0 || n % (i + 2) == 0) {
      return false;
    }
  }
  return true;
}
bool pdrome(string s) {
  long long n = s.length();
  for (long long i = 0; i < n / 2; i++) {
    if (s[i] != s[n - i - 1]) {
      return false;
    }
  }
  return true;
}
long long mindig(long long x) {
  long long ans = 9;
  long long t = x;
  while (x) {
    ans = min(ans, x % 10);
    x /= 10;
  }
  x = t;
  return ans;
}
long long maxdig(long long x) {
  long long ans = 0;
  long long t = x;
  while (x) {
    ans = max(ans, x % 10);
    x /= 10;
  }
  x = t;
  return ans;
}
long long modpow(long long x, long long n, long long M) {
  if (n == 0) return 1 % M;
  long long u = modpow(x, n / 2, M);
  u = (u * u) % M;
  if (n % 2 == 1) u = (u * x) % M;
  return u;
}
long long sum(long long a) {
  long long result = 0;
  while (a > 0) {
    result += a % 10;
    a /= 10;
  }
  return result;
}
long long digits(long long n) { return floor(log10(n) + 1); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, k, i, p1 = 0, p2 = 0;
  string s;
  cin >> n >> k >> s;
  if (k == 2) {
    for (i = 0; i < n; i++) {
      if (s[i] - 'A' != i % 2)
        p1++;
      else
        p2++;
    }
    cout << min(p1, p2) << endl;
    if (p1 < p2)
      for (i = 0; i < n; i++) cout << char('A' + i % 2);
    else
      for (i = 0; i < n; i++) cout << char('A' + 1 - (i % 2));
  } else {
    for (i = 1; i < n; i++) {
      if (s[i] == s[i - 1]) {
        p1++;
        s[i] = 'A';
        while (s[i] == s[i - 1] || s[i] == s[i + 1]) s[i]++;
      }
    }
    cout << p1 << endl << s;
  }
  return 0;
}