#include <bits/stdc++.h>
using namespace std;
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T Max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
bool isVowel(char ch) {
  ch = tolower(ch);
  return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u');
}
string s, t;
char tol;
int n;
bool isOk(char x, int i) {
  if (i == 0) return true;
  if (i == 1) return t[0] != x;
  return (t[i - 1] != x && t[i - 2] != x);
}
bool modify(int i) {
  char ch = 'a' - 1;
  for (; i < n; i++) {
    for (ch = 'a'; ch < tol; ch++) {
      if (isOk(ch, i)) {
        t[i] = ch;
        break;
      }
    }
    if (ch == tol) return false;
  }
  return true;
}
int main() {
  int i, j, k, tc, p;
  char x;
  while (cin >> n >> p) {
    cin >> s;
    t = s;
    tol = 'a' + p;
    bool changed = false;
    for (i = n - 1; i >= 0; i--) {
      for (x = s[i] + 1; x < tol; x++) {
        if (isOk(x, i)) {
          t[i] = x;
          changed = modify(i + 1);
          if (changed)
            break;
          else
            t = s;
        }
      }
      if (changed) break;
    }
    puts(changed ? t.c_str() : "NO");
  }
  return 0;
}
