#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--) {
    int check = 0;
    for (int k = s[i] - 'a' + 1; k < p; k++) {
      if (i > 0 && s[i - 1] - 'a' == k) continue;
      if (i > 1 && s[i - 2] - 'a' == k) continue;
      check = 1;
      s[i] = char(k + int('a'));
      break;
    }
    if (check == 0) continue;
    cerr << i << "\n";
    for (int j = 0; j <= i; j++) cout << s[j];
    cerr << "\n";
    for (int j = i + 1; j < n; j++) {
      int now = 0;
      if (j > 0 && s[j - 1] - 'a' == now || (j > 1 && s[j - 2] - 'a' == now))
        now++;
      if (j > 1 && s[j - 2] - 'a' == now || (j > 0 && s[j - 1] - 'a' == now))
        now++;
      s[j] = char(now + int('a'));
      cout << s[j];
    }
    return 0;
  }
  cout << "NO";
}
