#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 11, mod = 1e9 + 7;
const int INF1 = 2e9;
const long long INF2 = 2e18;
const int base = 500;
const int P = 31;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
const double EPS = 1e-9;
const double PI = acos(-1.0);
char s[1111], ans[1111];
int n, p;
int main() {
  if (fopen("queue"
            ".in",
            "r"))
    freopen(
        "queue"
        ".in",
        "r", stdin),
        freopen(
            "queue"
            ".out",
            "w", stdout);
  scanf("%d %d\n%s", &n, &p, &s);
  if (p == 2 && n > 2 || p == 1 && n > 1) return !printf("NO");
  for (int i = n - 1; i >= 0; --i) {
    for (char d = s[i] + 1; d < 'a' + p; ++d) {
      if (i > 0 && s[i - 1] == d || i > 1 && s[i - 2] == d) continue;
      for (int j = 0; j < n; ++j) {
        if (j < i) {
          ans[j] = s[j];
        } else {
          if (i == j) {
            ans[j] = d;
          } else {
            for (char c = 'a'; c < 'a' + p; ++c) {
              if (j > 0 && ans[j - 1] == c || j > 1 && ans[j - 2] == c)
                continue;
              ans[j] = c;
              break;
            }
          }
        }
      }
      return !printf("%s", ans);
    }
  }
  printf("NO");
  return 0;
}
