#include <bits/stdc++.h>
using namespace std;
const int N = 2001;
int n, p, vi(0);
char a[N], q[N];
void DFS(int o, int to) {
  if (o == n + 1) {
    vi++;
    return;
  }
  for (int x = to ? a[o] : 'a'; x <= 'a' + p - 1 && vi < 2; ++x)
    if ((x != q[o - 1] && (x != q[o - 2] || o == 2)) || (o == 1)) {
      q[o] = (char)x;
      DFS(o + 1, min(to, q[o] == a[o] ? 1 : 0));
    }
}
int main() {
  scanf("%d %d\n", &n, &p);
  scanf("%s", a + 1);
  DFS(1, 1);
  if (vi != 2) printf("NO");
  if (vi == 2) {
    for (int x = 1; x <= n; ++x) printf("%c", q[x]);
  }
  return 0;
}
