#include <bits/stdc++.h>
using namespace std;
char c[1010];
int main() {
  ios_base::sync_with_stdio(0);
  int p;
  int n;
  scanf("%d %d\n", &n, &p);
  char cc;
  n = 0;
  while (true) {
    cc = getchar();
    if (cc == ' ' || cc == '\n') break;
    c[n] = cc;
    n++;
  }
  for (int i = n - 1; i >= 0; i--) {
    while (true) {
      c[i]++;
      if (c[i] - 'a' >= p) break;
      if (i > 0 && c[i] == c[i - 1]) continue;
      if (i > 1 && c[i] == c[i - 2]) continue;
      bool allisok = true;
      for (int j = i + 1; j < n; j++) {
        bool good = false;
        for (int t = 'a'; t < 'a' + p; t++) {
          if (j > 1 && c[j - 2] == t) continue;
          if (c[j - 1] == t) continue;
          c[j] = t;
          good = true;
          break;
        }
        if (good == false) {
          allisok = false;
          break;
        }
      }
      if (allisok == false) continue;
      for (int j = 0; j < n; j++) printf("%c", c[j]);
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
