#include <bits/stdc++.h>
using namespace std;
inline bool is_pal(string s) {
  for (int i = 0; i < int(s.size() - 1); ++i) {
    if (s[i] == s[i + 1]) {
      return true;
    }
  }
  for (int i = 0; i < int(s.size() - 2); ++i) {
    if (s[i] == s[i + 2]) {
      return true;
    }
  }
  return false;
}
int main() {
  int n, p;
  cin >> n >> p;
  string trash, s;
  getline(cin, trash);
  getline(cin, s);
  if (p < 3) {
    if (n == 1) {
      if (s == "a" && p == 2) {
        cout << "b" << endl;
      } else {
        cout << "NO" << endl;
      }
    } else {
      if (s == "ab") {
        cout << "ba" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
    return 0;
  }
  for (int i = int(n) - 1; i >= 0; --i) {
    for (int j = int(s[i]) + 1; j < 'a' + p; ++j) {
      string res = s;
      res[i] = char(j);
      for (int c1 = 0; c1 < int(3); ++c1)
        for (int c2 = 0; c2 < int(3); ++c2)
          for (int c3 = 0; c3 < int(3); ++c3) {
            if (c1 == c2 || c1 == c3 || c2 == c3) continue;
            if (i + 1 < n) {
              res[i + 1] = char(c1 + 'a');
            }
            if (i + 2 < n) {
              res[i + 2] = char(c2 + 'a');
            }
            if (i + 3 < n) {
              res[i + 3] = char(c3 + 'a');
            }
            for (int k = i + 4; k < n; ++k) {
              res[k] = res[k - 3];
            }
            if (!is_pal(res)) {
              cout << res << endl;
              return 0;
            }
          }
    }
  }
  cout << "NO" << endl;
  return 0;
}
