#include <bits/stdc++.h>
using namespace std;
long long n, p;
void gen(string x, long long j) {
  long long m = x.length();
  if (x.length() == n) {
    cout << x << endl;
    exit(0);
  }
  for (; j < p; j++)
    if ((m > 0 && j == x[m - 1] - 'a') || (m > 1 && j == x[m - 2] - 'a'))
      continue;
    else
      gen(x + (char)('a' + j), 0);
  return;
}
int main() {
  string ans = "NO";
  cin >> n >> p;
  string s;
  cin >> s;
  for (int i = n - 1; i >= 0; i--) gen(s.substr(0, i), s[i] - 'a' + 1);
  cout << ans << endl;
  return 0;
}
