#include <bits/stdc++.h>
using namespace std;
string s;
int n, p;
bool solve(int ind, int id) {
  if (ind == n) return true;
  if ((ind - 1 >= 0 and s[ind - 1] - 'a' != id) or ind - 1 < 0) {
    if ((ind - 2 >= 0 and s[ind - 2] - 'a' != id) or ind - 2 < 0) {
      s[ind] = id + 'a';
      for (int i = 0; i < p; i++) {
        if (solve(ind + 1, i)) {
          return true;
        }
      }
    }
  }
  return false;
}
int main() {
  cin >> n >> p;
  cin >> s;
  int i;
  for (i = s.size() - 1; i >= 0; i--) {
    bool ok = true;
    for (int j = s[i] - 'a' + 1; j < p; j++) {
      if (solve(i, j)) {
        cout << s;
        return 0;
      }
    }
  }
  cout << "NO";
}
