#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  char s[1005];
  while (cin >> n >> p >> s) {
    int i, j, ok;
    ok = 0;
    for (i = n - 1; i >= 0; i--) {
      for (j = s[i] + 1; j < 'a' + p; j++) {
        if (j == s[i - 1] || j == s[i - 2]) continue;
        ok = 1;
        s[i] = j;
        break;
      }
      if (ok) break;
    }
    char ch;
    for (i += 1; i < n; i++) {
      for (ch = 'a'; ch < 'a' + p; ch++) {
        if (ch == s[i - 1] || ch == s[i - 2]) continue;
        s[i] = ch;
        break;
      }
    }
    if (ok)
      cout << s << endl;
    else
      cout << "NO" << endl;
  }
}
