#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
char s[maxn], res[maxn];
int n, p;
bool found = 0;
bool check(int i, char c) {
  if ((i >= 2 && res[i - 2] == c) || (i >= 1 && res[i - 1] == c)) return false;
  return true;
}
void call(int i, bool all) {
  if (i >= n) {
    if (all == false) return;
    res[i] = '\0';
    cout << res << endl;
    found = 1;
  } else {
    char st = (all ? 'a' : s[i]);
    for (res[i] = st; res[i] < 'a' + p && !found; res[i]++) {
      if (check(i, res[i])) call(i + 1, all || res[i] > s[i]);
    }
  }
}
int main(int argc, char const *argv[]) {
  scanf("%d %d", &n, &p);
  scanf("%s", s);
  call(0, 0);
  if (!found) {
    cout << "NO" << endl;
  }
  return 0;
}
