#include <bits/stdc++.h>
using namespace std;
long long int ppp = pow(10, 9) + 7;
int qqq = 998244353;
long long int power(long long int x, long long int y, long long int pp) {
  long long int res = 1;
  x = x % pp;
  while (y > 0) {
    if (y & 1) res = (res * x) % pp;
    y = y >> 1;
    x = (x * x) % pp;
  }
  return res;
}
long long int modInverse(long long int n, long long int pp) {
  return power(n, pp - 2, pp);
}
int main() {
  long long int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  char A[p];
  char x = 'a';
  for (int i = 0; i < 26; ++i) {
    A[i] = x;
    x++;
  }
  string k = "";
  for (int j = 0; j < n; ++j) {
    long long int x = j % 3;
    k += A[p - 1 - x];
  }
  if (s == k) {
    cout << "NO"
         << "\n";
  } else {
    long long int good = -1;
    for (int i = n - 1; i >= 0; i--) {
      char kkk = 'a';
      int z = (int)s[i] - (int)kkk;
      for (int j = z + 1; j < p; ++j) {
        if (s[i - 1] != A[j] && s[i - 2] != A[j]) {
          s[i] = A[j];
          good = i;
          break;
        }
      }
      if (good != -1) break;
    }
    for (int l = good + 1; l < n; ++l) {
      for (int i = 0; i < p; ++i) {
        if (A[i] != s[l - 1] && A[i] != s[l - 2]) {
          s[l] = A[i];
          break;
        }
      }
    }
    cout << s << "\n";
  }
  return 0;
}
