#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const double pi = acos(-1.0);
char s[1111];
int n, p;
int farm() {
  int i, j;
  int prei = n - 1;
  while (1) {
    j = n - 1;
    s[j]++;
    while (j > 0 && s[j] >= 'a' + p) {
      s[j] -= p;
      s[j - 1]++;
      j--;
    }
    if (j == 0 && s[j] >= 'a' + p) return 0;
    bool cant = 0;
    int st = min(j, prei);
    for (i = st; i < n; i++) {
      if (i >= 2 && s[i] == s[i - 2]) {
        cant = 1;
        break;
      }
      if (i >= 1 && s[i] == s[i - 1]) {
        cant = 1;
        break;
      }
    }
    if (cant) {
      prei = i;
      for (j = i + 1; j < n; j++) s[j] = 'a' + p - 1;
      continue;
    }
    return 1;
  }
}
int main() {
  scanf("%d%d ", &n, &p);
  gets(s);
  int ans = farm();
  if (ans == 0)
    puts("NO");
  else {
    puts(s);
  }
  return 0;
}
