#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test;
  test = 1;
  while (test--) {
    int n;
    cin >> n;
    int p;
    cin >> p;
    string str;
    cin >> str;
    for (int i = n - 1; i >= 0; i--) {
      bool poss = 1;
      string ans(n, 'X');
      for (int j = 0; j < i; j++) {
        ans[j] = str[j];
      }
      for (int j = i; j < n; j++) {
        bool found = 0;
        for (char ch = 'a'; ch < 'a' + p; ch++) {
          bool ok = 1;
          if (j == i) {
            ok = ok && (str[j] != ch);
            ok = ok && (str[j] < ch);
          }
          if (j - 1 >= 0) {
            ok = ok && (ans[j - 1] != ch);
          }
          if (j - 2 >= 0) {
            ok = ok && (ans[j - 2] != ch);
          }
          if (ok) {
            ans[j] = ch;
            found = 1;
            break;
          }
        }
        if (!found) {
          poss = 0;
          break;
        }
      }
      if (poss) {
        cout << ans << '\n';
        return 0;
      }
    }
    cout << "NO" << '\n';
    return 0;
  }
}
