#include <bits/stdc++.h>
using namespace std;
int N, P;
;
char str[1005];
bool Rec(int i) {
  if (i == 0 && str[i] == P)
    return 0;
  else if (i == 0) {
    str[i]++;
    return 1;
  }
  str[i]++;
  while (str[i] > P || (i - 1 >= 0 && str[i] == str[i - 1]) ||
         (i - 2 >= 0 && str[i] == str[i - 2])) {
    while ((i - 1 >= 0 && str[i] == str[i - 1]) ||
           (i - 2 >= 0 && str[i] == str[i - 2])) {
      str[i]++;
    }
    if (str[i] <= P) {
      return 1;
    }
    if (!Rec(i - 1)) return 0;
    str[i] = 'a';
  }
  return str[i] <= P;
}
int main() {
  scanf("%d %d %s", &N, &P, str);
  P += ('a' - 1);
  if (Rec(N - 1))
    printf("%s\n", str);
  else
    printf("NO\n");
  return 0;
}
