#include <bits/stdc++.h>
using namespace std;
string res;
bool check(string g, long long int i, char l) {
  if (i == g.length()) {
    res = g;
    return true;
  }
  char y = g[i];
  for (char c = g[i]; c <= l; c++) {
    if (i > 0 && g[i - 1] == c) continue;
    if (i > 1 && g[i - 2] == c) continue;
    g[i] = c;
    if (check(g, i + 1, l) == true) return true;
  }
  g[i] = y;
  return false;
}
int main() {
  long long int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  char l = char(96 + p);
  long long int i = n - 1;
  while (i >= 0) {
    string g = s;
    if (s[i] == l) {
      i--;
      continue;
    }
    g[i] = s[i] + 1;
    for (long long int j = i + 1; j < n; j++) g[j] = 'a';
    if (check(g, i, l)) {
      cout << res << endl;
      return 0;
    } else
      i--;
  }
  cout << "NO" << endl;
}
