#include <bits/stdc++.h>
using namespace std;
int n, p, l, mem[1005][27][27][2];
string s;
int solve(int indx, int prev, int pprev, bool change) {
  if (indx == l) return change;
  int &ret = mem[indx][prev][pprev][change];
  if (ret != -1) return ret;
  int j = 0;
  if (!change) j = s[indx] - 'a';
  for (int i = j; i < p; i++) {
    s[indx] = i + 'a';
    if (i != prev && i != pprev)
      if (solve(indx + 1, i, prev, change)) return ret = 1;
    change = true;
  }
  return ret = 0;
}
int main() {
  cin >> n >> p;
  cin >> s;
  l = s.length();
  memset(mem, -1, sizeof mem);
  if (solve(0, 26, 26, 0))
    cout << s << endl;
  else
    cout << "NO" << endl;
  return 0;
}
