#include <bits/stdc++.h>
using namespace std;
char a[1234567];
int n, p;
bool judge(int now) {
  for (int i = 1;; i++) {
    if (a[now] + i > 'a' + p - 1) return false;
    if (now > 0 && a[now] + i == a[now - 1]) continue;
    if (now > 1 && a[now] + i == a[now - 2]) continue;
    a[now] += i;
    return true;
  }
}
void get(int now) {
  for (int i = 0;; i++) {
    if (now > 0 && 'a' + i == a[now - 1]) continue;
    if (now > 1 && 'a' + i == a[now - 2]) continue;
    a[now] = 'a' + i;
    return;
  }
}
int main() {
  scanf("%d%d", &n, &p);
  scanf("%s", a);
  int ok = 0;
  int i;
  for (i = n - 1; i >= 0; i--) {
    if (judge(i)) {
      ok = 1;
      break;
    }
  }
  if (ok) {
    for (i = i + 1; i < n; i++) get(i);
    printf("%s\n", a);
  } else
    printf("NO\n");
  return 0;
}
