#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
const int inf = 2000000000;
char c, k;
int fl, gfl, j, n, p, i;
string ans, t, s;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> p;
  cin >> s;
  for (i = n - 1; i >= 0; i--) {
    for (c = s[i] + 1; c < 'a' + p; c++) {
      fl = 1;
      if (i > 0 && c == s[i - 1]) fl = 0;
      if (i > 1 && c == s[i - 2]) fl = 0;
      if (fl) {
        ans = "";
        for (j = 0; j < i; j++) ans += s[j];
        ans += c;
        gfl = 1;
        for (j = 0; j < n - i - 1; j++) {
          for (k = 'a'; k < 'a' + p; k++) {
            fl = 1;
            if (i + j + 1 > 0 && k == ans[i + j]) fl = 0;
            if (i + j > 0 && k == ans[i + j - 1]) fl = 0;
            if (fl) {
              ans += k;
              break;
            }
          }
          if (!fl) {
            gfl = 0;
            break;
          }
        }
        if (gfl) {
          cout << ans;
          return 0;
        }
      }
    }
  }
  cout << "NO";
}
