#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e18;
const long long MOD = (long long)1e9 + 7;
long long n, p, i, j, k;
string s;
char tmp;
int main() {
  cin >> n >> p >> s;
  if (p == 1) {
    cout << "NO" << endl;
    return 0;
  } else if (p == 2) {
    if (n == 1) {
      if (s[0] - 'a' + 1 == p)
        cout << "NO" << endl;
      else
        cout << char(s[0] + 1) << endl;
    } else if (n == 2) {
      if (s[1] - 'a' + 1 == p)
        cout << char(s[0] + 1) << 'a' << endl;
      else {
        for (i = s[1] - 'a' + 1; i < p; ++i)
          if (i + 'a' != s[0]) {
            cout << s[0] << char(i + 'a') << endl;
            return 0;
          }
        if (s[0] - 'a' + 1 == p)
          cout << "NO";
        else
          cout << char(s[0] + 1) << 'a' << endl;
        return 0;
      }
    } else
      cout << "NO" << endl;
    return 0;
  }
  for (i = n - 1; i >= 0; --i) {
    for (j = s[i] - 'a' + 1; j < p; ++j) {
      if (i > 0 && s[i - 1] == j + 'a') continue;
      if (i > 1 && s[i - 2] == j + 'a') continue;
      s[i] = j + 'a';
      if (i == n - 1) {
        cout << s << endl;
        return 0;
      }
      if (i < n - 1) {
        char x = '0', y = '0';
        if (i > 0) x = s[i - 1];
        y = s[i];
        if (x != 'a' && y != 'a')
          s[i + 1] = 'a';
        else if (x != 'b' && y != 'b')
          s[i + 1] = 'b';
        else
          s[i + 1] = 'c';
      }
      if (i < n - 2) {
        char x = '0', y = '0';
        x = s[i];
        y = s[i + 1];
        if (x != 'a' && y != 'a')
          s[i + 2] = 'a';
        else if (x != 'b' && y != 'b')
          s[i + 2] = 'b';
        else
          s[i + 2] = 'c';
      }
      for (j = i + 3; j < n; ++j) {
        char x = s[j - 1], y = s[j - 2];
        if (x != 'a' && y != 'a')
          s[j] = 'a';
        else if (x != 'b' && y != 'b')
          s[j] = 'b';
        else
          s[j] = 'c';
      }
      cout << s << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
