#include <bits/stdc++.h>
using namespace std;
int a[int(1e5 + 5)], i, m, ans, k, l, j, q, x, n, ma, mi, F, p;
string s;
int go(int x, char c) {
  if (c - 'a' + 1 > p) return 0;
  if (x - 1 >= 0 && s[x - 1] == c) return 0;
  if (x - 2 >= 0 && s[x - 2] == c) return 0;
  s[x] = c;
  for (int i = x + 1; i < n; i++) {
    for (int j = 'a'; j <= 'c'; j++) {
      F = 0;
      if (i - 1 >= 0 && s[i - 1] == j) F = 1;
      if (i - 2 >= 0 && s[i - 2] == j) F = 1;
      if (F) continue;
      s[i] = j;
      break;
    }
  }
  cout << s << endl;
  return 1;
}
int main() {
  cin >> n >> p >> s;
  if (p == 1) {
    cout << "NO";
    return 0;
  }
  if (p == 2) {
    if (s.size() > 2) {
      cout << "NO";
      return 0;
    }
    if (s.size() == 2) {
      if (s == "ab") {
        cout << "ba" << endl;
        return 0;
      }
      cout << "NO";
      return 0;
    }
    if (s.size() == 1) {
      if (s[0] == 'a') {
        cout << "b";
        return 0;
      } else {
        cout << "NO";
        return 0;
      }
    }
  }
  for (i = n - 1; i >= 0; i--) {
    if (go(i, s[i] + 1)) return 0;
    if (go(i, s[i] + 2)) return 0;
    if (go(i, s[i] + 3)) return 0;
  }
  cout << "NO";
  return 0;
}
