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