#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
inline int sgn(double x) { return fabs(x) < 1e-6 ? 0 : (x < 0 ? -1 : 1); }
int n, p;
char temp;
char s[1010];
char judge(int x) {
  for (char ch = s[x] + 1; ch <= 'a' + p - 1; ch++) {
    if (ch != s[x - 1] && ch != s[x - 2]) return ch;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &p);
  scanf("%s", s);
  int i;
  for (i = n - 1; i >= 0; i--) {
    temp = judge(i);
    if (temp) {
      s[i] = temp;
      break;
    }
  }
  if (i == -1)
    printf("NO\n");
  else {
    for (int j = i + 1; j < n; j++) {
      s[j] = 'a' - 1;
      s[j] = judge(j);
    }
    printf("%s\n", s);
  }
  return 0;
}
