#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k;
  string s;
  cin >> n >> k >> s;
  for (long long i = n - 1; i >= 0; i--) {
    string s1 = s;
    bool possible = false;
    char c;
    for (c = s[i] + 1; c < k + 'a'; c++) {
      if ((i < 1 || s[i - 1] != c) && (i < 2 || s[i - 2] != c)) {
        possible = true;
        break;
      }
    }
    if (possible) {
      s1[i] = c;
      possible = false;
      bool np = false;
      for (long long j = i + 1; j < n; j++) {
        char c1 = 'a';
        bool curr = false;
        for (; c1 < k + 'a'; c1++) {
          if ((j < 1 || s1[j - 1] != c1) && (j < 2 || s1[j - 2] != c1)) {
            curr = true;
            break;
          }
        }
        if (curr) {
          s1[j] = c1;
        } else {
          np = true;
          break;
        }
      }
      if (!np) {
        cout << s1 << endl;
        return 0;
      }
    }
  }
  cout << "NO\n";
}
