#include <bits/stdc++.h>
using namespace std;
char s[1100], original[1100];
int n, p, num[1100];
char Find(int pos) {
  for (char ch = s[pos] + 1; ch <= 'a' + p - 1; ch++) {
    if ((pos >= 2 && ch == s[pos - 1]) || (pos >= 3 && ch == s[pos - 2]))
      continue;
    else
      return ch;
  }
  return 0;
}
bool solve() {
  int L = -1;
  for (int i = n; i >= 1; i--) {
    char tmp = Find(i);
    if (tmp) {
      s[i] = tmp;
      L = i;
      break;
    }
  }
  if (L == -1) return false;
  for (int i = L + 1; i <= n; i++) {
    s[i] = 'a' - 1;
    char tmp = Find(i);
    if (tmp) s[i] = tmp;
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &p);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) original[i] = s[i];
  if (!solve())
    printf("NO\n");
  else
    printf("%s", s + 1);
  return 0;
}
