#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
const int N = 1000;
int n, p;
char s[N + 1];
bool good(int i) {
  for (char c = s[i] + 1; c - 'a' < p; c++) {
    bool ans = false;
    if (i >= 2) {
      if (c != s[i - 2] && c != s[i - 1]) ans = true;
    } else if (i >= 1) {
      if (c != s[i - 1]) ans = true;
    } else {
      ans = true;
    }
    if (ans) {
      s[i] = c;
      return true;
    }
  }
  return false;
}
bool run() {
  for (int i = n - 1; i >= 0; i--) {
    if (good(i)) {
      for (i++; i < n; i++) {
        s[i] = 'a';
        while ((i >= 2 && s[i - 2] == s[i]) || (i >= 1 && s[i - 1] == s[i]))
          s[i]++;
      }
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout << fixed;
  cin >> n >> p >> s;
  if (run()) {
    cout << s << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
