#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
char s[N], t;
int n, p, i, j, k;
int main() {
  scanf("%d%d", &n, &p);
  scanf("%s", s + 1);
  for (i = n; i; i--) {
    for (k = s[i] - 'a' + 1; k < p; k++) {
      t = k + 'a';
      if (i - 1 > 0 && s[i - 1] == t) continue;
      if (i - 2 > 0 && s[i - 2] == t) continue;
      if (p == 2 && n > 2) continue;
      if (p == 1 && n > 1) continue;
      for (j = 1; j < i; j++) putchar(s[j]);
      putchar(s[i] = t);
      for (j = i + 1; j <= n; j++) {
        for (k = 0; k < p; k++) {
          t = k + 'a';
          if (j - 1 > 0 && s[j - 1] == t) continue;
          if (j - 2 > 0 && s[j - 2] == t) continue;
          putchar(s[j] = t);
          break;
        }
      }
      return 0;
    }
  }
  return puts("NO"), 0;
}
