#include <bits/stdc++.h>
using namespace std;
int n, p;
string st;
string tryMake(string ss, int changeIdx, int startFrom = 0) {
  if (changeIdx >= ss.length()) return ss;
  for (int i = startFrom; i < p; ++i)
    if (changeIdx > 1 &&
        !(ss[changeIdx - 1] - 'a' == i || ss[changeIdx - 2] - 'a' == i)) {
      ss[changeIdx] = i + 'a';
      return tryMake(ss, changeIdx + 1);
    } else if ((changeIdx == 1 && ss[changeIdx - 1] - 'a' != i) ||
               changeIdx == 0) {
      ss[changeIdx] = i + 'a';
      return tryMake(ss, changeIdx + 1);
    }
  return "NO";
}
string solve(string ss) {
  for (int i = ss.length() - 1; i >= 0; i--) {
    string ret = tryMake(ss, i, ss[i] - 'a' + 1);
    if (ret != "NO") return ret;
  }
  return "NO";
}
int main() {
  cin >> n >> p >> st;
  cout << solve(st);
  return 0;
}
