#include <bits/stdc++.h>
using namespace std;
const int inf = 999999999;
const int mod = 1000000007;
inline int Getint() {
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  int ret = 0;
  while (ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0', ch = getchar();
  return ret;
}
char ch[1010];
int n, p;
int main() {
  n = Getint(), p = Getint();
  scanf("%s", ch + 1);
  if (p == 1) {
    printf("NO\n");
  } else {
    for (int i = n; i > 0; i--) {
      for (int j = ch[i] + 1; j <= 96 + p; j++) {
        bool flag = true;
        if (i > 1 && j == ch[i - 1]) flag = false;
        if (i > 2 && j == ch[i - 2]) flag = false;
        if (flag == true) {
          ch[i] = j;
          for (int k = i + 1; k <= n; k++) {
            for (int l = 97; l <= 96 + p; l++) {
              bool flag = true;
              if (k > 1 && l == ch[k - 1]) flag = false;
              if (k > 2 && l == ch[k - 2]) flag = false;
              if (flag) {
                ch[k] = l;
                break;
              }
            }
          }
          for (int k = 1; k <= n; k++) printf("%c", ch[k]);
          printf("\n");
          return 0;
        }
      }
    }
    printf("NO\n");
  }
  return 0;
}
