#include <bits/stdc++.h>
using namespace std;
int n, p;
char str[1010];
int a[1010];
int b[1010];
char res[1010];
bool OK(int i, int val) {
  if (i >= 2) {
    if (val == b[i - 1] || val == b[i - 2]) return false;
  } else if (i >= 1) {
    if (val == b[i - 1]) return false;
  }
  return true;
}
int main() {
  cin >> n >> p;
  cin >> str;
  for (int i = 0; i < n; ++i) a[i] = str[i] - 'a';
  int begin;
  memcpy(b, a, sizeof(a));
  for (begin = n - 1; begin >= 0; --begin) {
    int val;
    for (val = a[begin] + 1; val < p; ++val) {
      if (begin >= 2) {
        if (val != a[begin - 1] && val != a[begin - 2]) {
          b[begin] = val;
          break;
        }
      } else if (begin >= 1) {
        if (val != a[begin - 1]) {
          b[begin] = val;
          break;
        }
      } else {
        b[begin] = val;
        break;
      }
    }
    if (val < p) {
      break;
    }
  }
  if (begin < 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = begin + 1; i < n; ++i) {
    if (OK(i, 0))
      b[i] = 0;
    else if (OK(i, 1))
      b[i] = 1;
    else if (OK(i, 2))
      b[i] = 2;
  }
  for (int i = 0; i < n; ++i) str[i] = b[i] + 'a';
  str[n] = 0;
  cout << str << endl;
  return 0;
}
