#include <bits/stdc++.h>
using namespace std;
int n, p;
string s;
bool safe(char c, int i) {
  if ((i - 2 < 0 || c != s[i - 2]) && (i - 1 < 0 || c != s[i - 1])) return 1;
  return 0;
}
bool calc(int l) {
  for (int i = l + 1; i < n; i++) {
    for (int j = 0; j <= p; j++) {
      if (j == p) return 0;
      char c = 'a' + j;
      if (safe(c, i)) {
        s[i] = c;
        break;
      }
    }
  }
  return 1;
}
bool ok(int i) {
  for (int b = 1; b < p; b++) {
    char c = s[i] + b;
    if (c >= 'a' + p) return 0;
    if ((c != s[i - 1] || i - 1 < 0) && (c != s[i - 2] || i - 2 < 0)) {
      char tem = s[i];
      s[i] = c;
      if (calc(i)) {
        return 1;
      } else
        s[i] = tem;
    }
  }
  return 0;
}
void solve() {
  for (int i = n - 1; i >= 0; i--) {
    if (ok(i)) {
      cout << s << endl;
      exit(0);
    }
  }
  cout << "NO" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> p >> s;
  solve();
  return 0;
}
