#include <bits/stdc++.h>
using namespace std;
const char lend = '\n';
int n, k;
string str, res;
int add(int p) {
  for (int i = p + 1; i < n; ++i) str[i] = 'a';
  int c = 1;
  for (int i = p; i >= 0 && c; --i) {
    str[i] += c;
    c = 0;
    if (str[i] == 'a' + k) c = 1, str[i] = 'a';
  }
  if (c) return 0;
  return 1;
}
int get() {
  for (int i = 0; i < n; ++i) {
    if (str[i] == str[i + 1]) return i + 1;
    if (i + 2 < n && str[i] == str[i + 2]) return i + 2;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> k;
  cin >> str;
  if (!add(n - 1)) {
    cout << "NO\n";
    return 0;
  }
  while (1) {
    int pos = get();
    if (pos == -1) {
      res = str;
      break;
    }
    if (!add(pos)) break;
  }
  if (res.empty()) res = "NO";
  cout << res << lend;
}
