#include <bits/stdc++.h>
using namespace std;
bool put(char ch, int pos, string &ans) {
  return pos == 0 || (pos == 1 && ch != ans[pos - 1]) ||
         (pos > 1 && ch != ans[pos - 1] && ch != ans[pos - 2]);
}
bool push_back(char st, char nd, int pos, string &ans) {
  for (char ch = st; ch < nd; ch++) {
    if (put(ch, pos, ans)) {
      ans.push_back(ch);
      return true;
    }
  }
  return false;
}
int main() {
  int n;
  int p;
  string str;
  while (cin >> n >> p >> str) {
    string ans;
    for (int i = n - 1; i >= 0; i--) {
      ans = str.substr(0, i);
      if (!push_back(str[i] + 1, 'a' + p, i, ans)) {
        continue;
      }
      for (int j = i + 1; j < n; j++) {
        if (!push_back('a', 'a' + p, j, ans)) {
          break;
        }
      }
      if ((int)ans.size() == n) {
        break;
      }
    }
    if ((int)ans.size() != n) {
      cout << "NO" << endl;
    } else {
      cout << ans << endl;
    }
  }
  return 0;
}
