#include <bits/stdc++.h>
using namespace std;
int n = 11, p = 3;
string s = "abcabcabcab", line = "acb";
char jj(int j) {
  for (char x = s[j] + 1; x <= p; x++)
    if (x != s[j - 1] && x != s[j - 2]) {
      return x;
    }
  return 0;
}
int main() {
  cin >> n >> p;
  p = 'a' + p - 1;
  cin >> s;
  int j;
  char flag;
  for (j = s.length() - 1; j >= 0; j--) {
    flag = jj(j);
    if (flag) {
      s[j] = flag;
      break;
    }
  }
  if (j == -1) {
    cout << "NO\n";
    return 0;
  }
  for (int i = j + 1; i < s.length(); i++) {
    s[i] = 'a' - 1;
    s[i] = jj(i);
  }
  cout << s << endl;
  return 0;
}
