#include <bits/stdc++.h>
using namespace std;
vector<char> v;
long long pos(long long i, string s, string ans, long long p) {
  long long ind = (int)(s[i] - 'a');
  long long j = ind + 1;
  while (j < p) {
    if ((i - 1) >= 0 && (int)(s[i - 1] - 'a') == j) {
      j++;
      continue;
    }
    if ((i - 2) >= 0 && (int)(s[i - 2] - 'a') == j) {
      j++;
      continue;
    }
    return j;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long n, p;
    cin >> n >> p;
    string s;
    cin >> s;
    string ans = s;
    for (long long i = 0; i < p; i++) {
      v.push_back((char)(i + 'a'));
    }
    bool flg = 1;
    for (long long i = n - 1; i >= 0; i--) {
      long long j = pos(i, s, ans, p);
      if (j) {
        ans[i] = (char)(j + 'a');
        for (long long k = i + 1; k < n; k++) {
          flg = 0;
          for (long long r = 0; r < p; r++) {
            if ((k - 1) >= 0 && (int)(ans[k - 1] - 'a') == r) continue;
            if ((k - 2) >= 0 && (int)(ans[k - 2] - 'a') == r) continue;
            flg = 1;
            ans[k] = (char)(r + 'a');
            break;
          }
          if (flg == 0) {
            break;
          }
        }
        if (flg) {
          cout << ans;
          return 0;
        }
      }
    }
    cout << "NO";
  }
  return 0;
}
