#include <bits/stdc++.h>
using namespace std;
int p, n;
string s;
bool solve(int a) {
  if (a == n) return 1;
  for (char i = 'a'; i < p + 'a'; i++) {
    if (s[a - 1] == i || s[a - 2] == i) continue;
    s[a] = i;
    if (solve(a + 1)) return true;
  }
  return false;
}
int main() {
  cin >> n >> p;
  cin >> s;
  int a = n - 1;
  while (a >= 0) {
    for (char c = s[a] + 1; c < 'a' + p; c++) {
      if ((a && s[a - 1] == c) || (a > 1 && s[a - 2] == c)) continue;
      s[a] = c;
      assert(solve(a + 1));
      cout << s;
      return 0;
    }
    a--;
  }
  cout << "NO";
  return 0;
}
