#include <bits/stdc++.h>
using namespace std;
char a[1004];
int p, n;
inline bool Check() {
  if (a[1] == a[2]) return 0;
  for (int i = 2; i < n; ++i)
    if (a[i + 1] == a[i - 1] || a[i] == a[i + 1]) return 0;
  return 1;
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> p;
  char C = p + 'a' - 1;
  cin >> (a + 1);
  for (int i = n; i >= 1; --i) {
    while (a[i] < C) {
      ++a[i];
      if (a[i] != a[i - 1]) {
        bool ok = 1;
        if (i > 1 && a[i] == a[i - 2]) continue;
        for (int j = i + 1; j <= n; ++j) {
          if (a[j - 2] != 'a' && a[j - 1] != 'a')
            a[j] = 'a';
          else if (a[j - 2] != 'b' && a[j - 1] != 'b') {
            a[j] = 'b';
            if (a[j] > C) ok = 0;
          } else {
            a[j] = 'c';
            if (a[j] > C) ok = 0;
          }
        }
        if (ok) {
          cout << (a + 1) << "\n";
          return 0;
        }
      }
    }
  }
  cout << "NO\n";
  return 0;
}
