#include <bits/stdc++.h>
using namespace std;
char s[1001];
char* test(const char* t, unsigned int l, unsigned int n) {
  if (n < l) return s + n - 1;
  unsigned int j = n % l;
  for (unsigned int i = n - 1; i != -1; --i, --j) {
    if (s[i] != t[j % l]) return s + i;
  }
  return s;
}
int main() {
  unsigned int n, p;
  cin >> n >> p >> s;
  char t[3];
  for (unsigned int i = p < 3 ? p : 3; i > 0; --i)
    t[3 - i] = p - (3 - i) + 'a' - 1;
  bool go = true, ok = true;
  char last = p + 'a', *st = test(t, p < 3 ? p : 3, n);
  while (go) {
    ++(*st);
    while (*st >= last) {
      if (st > s) {
        --st;
        ++(*st);
      } else {
        go = ok = false;
        break;
      }
    }
    if (go && ok) {
      bool same = false;
      if (st - s && *(st - 1) == *st) same = true;
      if (st - s > 1 && *(st - 2) == *st) same = true;
      if (!same) go = false;
    }
  }
  if (ok) {
    unsigned int l = p < 3 ? p : 3;
    for (unsigned int i = 0; i < l; ++i) t[i] = i + 'a';
    if (l > 2 && *st == t[1]) swap(t[1], t[2]);
    if (l > 2 && st > s && *(st - 1) == t[0]) swap(t[0], t[1]);
    unsigned int j = 0;
    for (char* q = st + 1; q != s + n; ++q, ++j) *q = t[j % l];
    cout << s << endl;
  } else
    cout << "NO\n";
  return 0;
}
