#include <bits/stdc++.h>
using namespace std;
const int MAXN = int(2e5 + 7);
int n, p;
string second;
bool check1(int x) {
  if (x + 2 < n && (second[x] == second[x + 1] || second[x] == second[x + 2]))
    return 0;
  else if (x + 1 < n && second[x] == second[x + 1])
    return 0;
  return 1;
}
bool check2(int x) {
  if (x - 2 >= 0 && (second[x] == second[x - 1] || second[x] == second[x - 2]))
    return 0;
  else if (x - 1 >= 0 && second[x] == second[x - 1])
    return 0;
  return 1;
}
bool build(int x) {
  char c = 'a', c1[3];
  int a[40];
  memset(a, 0, 30);
  for (int i = x; i < x + 3 && i < n; i++) {
    int t = 0;
    second[i] = 'a';
    while (t < p && (!check2(i) || a[t] == 1)) second[i]++, t++;
    if (a[t] == 1 || t == p) return 0;
    a[t] = 1;
    c1[i - x] = second[i];
  }
  for (int i = x + 3; i < n; i++) second[i] = c1[(i - x) % 3];
  return 1;
}
int main() {
  cin >> n >> p >> second;
  for (int i = n - 1; i >= 0; i--) {
    while (second[i] - 'a' + 1 < p) {
      second[i]++;
      if (i < n - 1 && check2(i) && build(i + 1) && check1(i)) {
        cout << second;
        return 0;
      } else if (i == n - 1 && check2(i)) {
        cout << second;
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
