#include <bits/stdc++.h>
int n, p, flag;
char st1[1010];
void init() {
  scanf("%d%d\n", &n, &p);
  scanf("%s", st1);
}
int check(int x) {
  for (int i = st1[x] + 1; i <= 'a' + p - 1; i++) {
    if (x > 0 && i == st1[x - 1]) continue;
    if (x > 1 && i == st1[x - 2]) continue;
    return i;
  }
  return 0;
}
void print(int x) {
  for (int i = 'a'; i <= 'a' + p - 1; i++) {
    if (x > 0 && i == st1[x - 1]) continue;
    if (x > 1 && i == st1[x - 2]) continue;
    st1[x] = i;
    printf("%c", i);
    return;
  }
}
void solve() {
  int flag = -1;
  for (int i = n - 1; i >= 0; i--) {
    if (check(i)) {
      flag = i;
      break;
    }
  }
  if (flag != -1) {
    st1[flag] = check(flag);
    for (int i = 0; i <= flag; i++) printf("%c", st1[i]);
    for (int i = flag + 1; i < n; i++) print(i);
  } else
    printf("NO\n");
}
int main() {
  init();
  solve();
}
