#include <bits/stdc++.h>
using namespace std;
int n, k, sz;
string s;
bool check(int pos) {
  if (pos == n) return 1;
  for (; s[pos] - 'a' < k; s[pos]++) {
    if (pos > 0 && s[pos] == s[pos - 1]) continue;
    if (pos > 1 && s[pos] == s[pos - 2]) continue;
    if (check(pos + 1)) return 1;
  }
  s[pos] = 'a';
  return 0;
}
int main() {
  scanf("%d %d", &n, &k);
  cin >> s;
  sz = s.size();
  s[sz - 1]++;
  if (check(0))
    cout << s << endl;
  else
    cout << "NO" << endl;
  return 0;
}
