#include <bits/stdc++.h>
using namespace std;
char s[1100];
char ans[1100];
int n, p;
bool vaild(int a, int b, int c) {
  if (a != b && a != c && b != c) return true;
  return false;
}
void build(int x) {
  for (int i = 0; i < x; ++i) ans[i] = s[i];
  for (int i = x; i <= n + 1; ++i) {
    for (int j = 0; j < p; ++j) {
      if (vaild(ans[i - 2], ans[i - 1], j)) {
        ans[i] = j;
        break;
      }
    }
  }
}
int main() {
  scanf("%d%d%s", &n, &p, s + 2);
  for (int i = 2; i <= n + 1; ++i) s[i] -= 'a';
  s[0] = -1, s[1] = -2;
  bool flag = false;
  for (int i = n + 1; i >= 2; --i) {
    bool succ = false;
    for (int j = s[i] + 1; j < p; ++j) {
      if (vaild(s[i - 2], s[i - 1], j)) {
        s[i] = j;
        build(i + 1);
        succ = true;
        break;
      }
    }
    if (succ) {
      flag = true;
      break;
    }
  }
  if (flag) {
    for (int i = 2; i <= n + 1; ++i) putchar(ans[i] + 'a');
    puts("");
  } else {
    printf("NO\n");
  }
  return 0;
}
