#include <bits/stdc++.h>
using namespace std;
long long n, p;
string s;
long long arr[1005], temp[1005];
bool possible(long long pos) {
  for (long long i = 0; i <= n; i++) temp[i] = arr[i];
  for (long long i = pos; i <= n; i++) {
    long long start = (i == pos ? temp[i] + 1 : 0);
    temp[i] = -1;
    for (long long j = start; j < p; j++) {
      if (j == temp[i - 1] || j == temp[i - 2]) continue;
      temp[i] = j;
      break;
    }
    if (temp[i] == -1) return false;
  }
  return true;
}
signed main() {
  cin >> n >> p;
  cin >> s;
  arr[0] = 50;
  for (long long i = 1; i <= n; i++) arr[i] = s[i - 1] - 'a';
  for (long long i = n; i >= 1; i--) {
    if (possible(i)) {
      for (long long j = 1; j <= n; j++) cout << char('a' + temp[j]);
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
