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