#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4;
char str[maxn];
int n, p;
int mp[28];
int change[maxn];
int flag = 0;
char ch[3] = {'a', 'b', 'c'};
int main() {
  scanf("%d %d", &n, &p);
  scanf("%s", str);
  if (p == 1) {
    printf("NO\n");
  } else if (p == 2) {
    if (n == 1 && str[0] == 'a')
      printf("b\n");
    else if (n == 2 && str[0] < str[1])
      printf("%c%c\n", str[1], str[0]);
    else
      printf("NO\n");
  } else {
    int tp = n - 1;
    int found = 0;
    for (tp = n - 1; tp >= 0; tp--) {
      for (int i = str[tp] + 1; i < p + 'a'; i++) {
        if (tp - 1 >= 0 && str[tp - 1] == i) continue;
        if (tp - 2 >= 0 && str[tp - 2] == i) continue;
        found = 1;
        str[tp] = i;
        break;
      }
      if (found) break;
    }
    if (found == 0) {
      printf("NO\n");
    } else {
      int temp = tp;
      if (temp - 1 >= 0) mp[str[temp - 1] - 'a'] = 1;
      mp[str[temp] - 'a'] = 1;
      for (int i = 0; i < 3; i++) {
        if (mp[0] == 0) {
          str[temp + i + 1] = ch[i] = 'a';
        } else if (mp[1] == 0) {
          str[temp + i + 1] = ch[i] = 'b';
        } else if (mp[2] == 0) {
          str[temp + i + 1] = ch[i] = 'c';
        }
        if (temp + i - 1 >= 0) mp[str[temp + i - 1] - 'a'] = 0;
        mp[str[temp + i + 1] - 'a'] = 1;
      }
      int nxt = 0;
      for (tp = tp + 1; tp < n; tp++) {
        str[tp] = ch[nxt];
        nxt = (nxt + 1) % 3;
      }
      str[n] = '\0';
      printf("%s\n", str);
    }
  }
}
