#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n, p;
  while (cin >> n >> p) {
    if ((p == 2 && n > 2)) {
      cout << "NO" << endl;
      continue;
    }
    string s, org;
    cin >> s;
    org = s;
    reverse(s.begin(), s.end());
    string res = "";
    bool f = 0;
    int idx = -1;
    char c = 0;
    for (int i = (0); i < (n); i++) {
      if (f) break;
      for (char j = s[i] + 1; j < 'a' + p; j++) {
        s[i] = j;
        if ((i < s.length() - 1 && j == s[i + 1]) ||
            (i < s.length() - 2 && j == s[i + 2]))
          continue;
        else {
          idx = s.length() - i - 1;
          c = j;
          f = 1;
          break;
        }
      }
    }
    if (!f)
      cout << "NO" << endl;
    else {
      string temp = "";
      reverse(s.begin(), s.end());
      for (int i = (idx + 1); i < (n); i++) {
        for (char j = 'a'; j < 'a' + p; j++) {
          s[i] = j;
          if ((i > 0 && j == s[i - 1]) || (i > 1 && j == s[i - 2]))
            continue;
          else {
            temp.push_back(j);
            break;
          }
        }
      }
      cout << s.substr(0, idx + 1) << temp << endl;
    }
  }
  return 0;
}
