#include <bits/stdc++.h>
using namespace std;
int n, p, x;
char s[1005], c1, c2;
bool build_sol();
int main() {
  int i;
  cin >> n >> p;
  cin.getline(s + 1, 1005, '\n');
  cin.getline(s + 1, 1005, '\n');
  if (!build_sol())
    cout << "NO";
  else
    cout << s + 1;
  return 0;
}
bool build_sol() {
  int i;
  x = n;
  s[x]++;
  while ((x >= 2 && s[x] == s[x - 1]) || (x >= 3 && s[x] == s[x - 2])) s[x]++;
  while (x > 0 && s[x] - 'a' >= p) {
    s[x] = 'a';
    x--;
    s[x]++;
    while ((x >= 2 && s[x] == s[x - 1]) || (x >= 3 && s[x] == s[x - 2])) s[x]++;
  }
  if (!x) return 0;
  c1 = s[x];
  if (x >= 2)
    c2 = s[x - 1];
  else
    c2 = '0';
  for (i = x + 1; i <= n; i++) {
    while (s[i] == c1 || s[i] == c2) s[i]++;
    c2 = c1;
    c1 = s[i];
  }
  return 1;
}
