#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
const long long M = 100000000007;
const long long dx[4] = {1, 0, -1, 0};
const long long dy[4] = {0, 1, 0, -1};
long long n, p;
string s, a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p >> s;
  if (p == 1) {
    cout << "NO" << '\n';
    return 0;
  }
  for (long long i = n - 1; i >= 0; i--) {
    a = s;
    a[i] = (a[i] - 'a' + 1) % p + 'a';
    for (long long j = i; j < n; j++) {
      if (j != i) a[j] = 'a';
      if (j > 1)
        while (a[j - 1] == a[j] || a[j - 2] == a[j])
          a[j] = (a[j] - 'a' + 1) % p + 'a';
      else if (j == 1)
        while (a[j - 1] == a[j]) a[j] = (a[j] - 'a' + 1) % p + 'a';
    }
    for (long long j = 0; j < i; j++)
      if (a[i] - 'a' > p) continue;
    if (a[i] > s[i]) break;
  }
  if (a[0] >= s[0])
    cout << a << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
