#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  for (int i = n - 1; i >= 0; i--)
    for (char c = s[i] + 1; c < 'a' + p; c++) {
      if (i >= 1 && c == s[i - 1]) continue;
      if (i >= 2 && c == s[i - 2]) continue;
      string res = s.substr(0, i) + string(1, c);
      int m = res.length();
      for (int j = (0); j < (n - m); ++j) {
        int oril = res.length();
        for (char d = 'a'; d < 'a' + p; d++) {
          if ((int)res.length() >= 1 && d == res.back()) continue;
          if ((int)res.length() >= 2 && d == res[res.length() - 2]) continue;
          res += string(1, d);
          break;
        }
        int newl = res.length();
        if (oril == newl) break;
      }
      if ((int)res.length() == n) {
        cout << res;
        return 0;
      }
    }
  cout << "NO";
}
