#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long INF_LL = 1000000000000000000LL;
const double pi = 2 * acos(0.0);
template <class T>
void smin(T& a, T b) {
  if (a > b) a = b;
}
template <class T>
void smax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
T gcd(T a, T b) {
  return b == 0 ? a : gcd(b, a % b);
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <typename Iterator>
void print(const char* fmt, Iterator begin, Iterator end,
           const char* separator = " ") {
  for (Iterator it = begin; it != end; ++it) {
    if (it != begin) printf(separator);
    printf(fmt, *it);
  }
  printf("\n");
}
const int h = 1011;
int n, p;
char s[h];
int main() {
  scanf("%d%d%s", &n, &p, s);
  bool ok = false;
  for (int i(n - 1), _b(0); i >= _b; --i) {
    char c1 = i == 0 ? '\0' : s[i - 1];
    char c2 = i <= 1 ? '\0' : s[i - 2];
    do {
      ++s[i];
      if (s[i] >= 'a' + p) break;
      if (s[i] != c1 && s[i] != c2) {
        ok = true;
        break;
      }
    } while (true);
    if (ok) {
      for (int j(i + 1), _b(n); j < _b; ++j) {
        char c1 = j == 0 ? '\0' : s[j - 1];
        char c2 = j <= 1 ? '\0' : s[j - 2];
        s[j] = 'a';
        while (s[j] < 'a' + p && (s[j] == c1 || s[j] == c2)) ++s[j];
        if (s[j] == 'a' + p) {
          ok = false;
          break;
        }
      }
      break;
    }
  }
  printf("%s\n", ok ? s : "NO\n");
  return 0;
}
