#include <bits/stdc++.h>
using namespace std;
int n, p;
string s, ans;
bool rec(int pos, bool start) {
  if (pos == n) return start;
  for (char i = ((start == 0) ? s[pos] : 'a'); i < p + 'a'; i++) {
    if (pos > 0 && i == ans[pos - 1]) continue;
    if (pos > 1 && i == ans[pos - 2]) continue;
    ans[pos] = i;
    if (rec(pos + 1, start | (i > s[pos]))) {
      return true;
    }
  }
  return false;
}
int main() {
  bool flg;
  cin >> n >> p >> s;
  ans = s;
  flg = rec(0, 0);
  if (flg)
    cout << ans << endl;
  else
    cout << "NO" << endl;
  return 0;
}
