#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  string s;
  cin >> s;
  if (n > 2 && p <= 2) {
    cout << "NO" << endl;
    return 0;
  }
  int done = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (done == 1) break;
    int d = s[i] - 'a' + 1;
    int flag = 1;
    while (d < p) {
      if (i > 0 && s[i - 1] == 'a' + d) {
        flag = 0;
      } else if (i > 1 && s[i - 2] == 'a' + d) {
        flag = 0;
      }
      string s2 = s;
      if (flag != 0) {
        if (i == n - 1) {
          s[n - 1] = 'a' + d;
        } else {
          s[i] = 'a' + d;
          for (int j = i + 1; j < n; j++) {
            int k = 0;
            for (k = 0; k < p; k++) {
              if (s[j - 1] == k + 'a')
                continue;
              else if (s[j - 2] == k + 'a')
                continue;
              else {
                s[j] = k + 'a';
                break;
              }
            }
            if (k == p) {
              s = s2;
              break;
            }
          }
        }
        done = 1;
        break;
      } else {
        flag = 1;
      }
      d++;
    }
  }
  if (done == 1)
    cout << s << endl;
  else
    cout << "NO" << endl;
}
