#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  int i;
  if (p == 2 && n > 2 || p == 1 && n > 1) {
    cout << "NO";
    return 0;
  }
  for (i = n - 1; i >= 0; i--) {
    for (char c = s[i] + 1; c < 'a' + p; c++) {
      if (i - 1 >= 0 && s[i - 1] == c) continue;
      if (i - 2 >= 0 && s[i - 2] == c) continue;
      for (int j = 0; j <= n - 1; j++) {
        if (j < i) {
          cout << s[j];
          continue;
        }
        if (j == i) {
          s[j] = c;
          cout << s[j];
          continue;
        }
        for (char c = 'a'; c < 'a' + p; c++) {
          if (j - 1 >= 0 && s[j - 1] == c) continue;
          if (j - 2 >= 0 && s[j - 2] == c) continue;
          s[j] = c;
          break;
        }
        cout << s[j];
      }
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
