#include <bits/stdc++.h>
using namespace std;
string s;
char a[10][10];
bool ok1(string s1, int p) {
  for (int i = 0; i < (int)(s1.size()) - 1; ++i)
    if (s1[i] == s1[i + 1]) return 0;
  for (int i = 0; i < (int)(s1.size()) - 2; ++i)
    if (s1[i] == s1[i + 2]) return 0;
  for (int i = 0; i < (int)(s1.size()); ++i)
    if (s1[i] - 'a' + 1 > p) return 0;
  return 1;
}
int main() {
  int n, p;
  cin >> n >> p;
  cin >> s;
  a[1][0] = 'a';
  a[1][1] = 'b';
  a[1][2] = 'c';
  a[2][0] = 'a';
  a[2][1] = 'c';
  a[2][2] = 'b';
  a[3][0] = 'b';
  a[3][1] = 'a';
  a[3][2] = 'c';
  a[4][0] = 'b';
  a[4][1] = 'c';
  a[4][2] = 'a';
  a[5][0] = 'c';
  a[5][1] = 'a';
  a[5][2] = 'b';
  a[6][0] = 'c';
  a[6][1] = 'b';
  a[6][2] = 'a';
  for (int i = n - 1; i >= 0; --i) {
    string s2 = s;
    bool ok = 1;
    for (int j = 0; j < i; ++j) {
      s2[j] = s[j];
      if (s2[j] - 'a' + 1 > p) {
        ok = 0;
        break;
      }
    }
    for (int j = s[i] + 1 - 'a'; j < p; ++j) {
      s2[i] = j + 'a';
      for (int k = 1; k <= 6; ++k) {
        for (int x = i + 1, t = 0; x < n; ++x, ++t) s2[x] = a[k][t % 3];
        if (ok1(s2, p)) {
          cout << s2;
          return 0;
        }
      }
    }
  }
  printf("NO\n");
  return 0;
}
