#include <bits/stdc++.h>
long long mod = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  int n, p;
  cin >> n >> p;
  string x;
  cin >> x;
  int i = n - 1;
  x[i]++;
  while (i >= 0 && i < n) {
    if (x[i] > (char)('a' + p - 1)) {
      x[i] = 'a';
      x[i - 1]++;
      i--;
      continue;
    }
    if (i >= 1 && x[i] == x[i - 1] || i >= 2 && x[i] == x[i - 2]) {
      x[i]++;
      continue;
    }
    i++;
  }
  if (i <= 0)
    cout << "NO\n";
  else
    cout << x;
  return 0;
}
