#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int N = 2e5 + 10;
char s[1010];
int a[1010], c[1010][1010];
int n, p;
int main() {
  scanf("%d%d", &n, &p);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) a[i] = s[i] - 'a';
  a[0] = -1;
  memset(c, -1, sizeof(c));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i - 1; j++) c[i][j] = a[j];
    for (int j = a[i] + 1; j <= p - 1; j++)
      if (i == 1) {
        c[i][i] = j;
        break;
      } else if (j != a[i - 1] && j != a[i - 2]) {
        c[i][i] = j;
        break;
      }
    for (int j = i + 1; j <= n; j++)
      for (int k = 0; k <= p - 1; k++)
        if (k != c[i][j - 1] && k != c[i][j - 2]) {
          c[i][j] = k;
          break;
        }
  }
  int flag = 1, temp = 0;
  for (int i = n; i >= 1; i--) {
    flag = 0;
    temp = i;
    for (int j = 1; j <= n; j++)
      if (c[i][j] == -1) {
        flag = 1;
        break;
      }
    if (!flag) break;
  }
  if (!flag)
    for (int i = 1; i <= n; i++) putchar(c[temp][i] + 'a');
  else
    puts("NO");
  return 0;
}
