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