#include <bits/stdc++.h>
using namespace std;
int n, p, t, a[1010], k, x, y, z;
string s;
vector<string> v;
int main() {
  cin >> n >> p;
  cin >> s;
  if (p == 1) {
    cout << "NO";
    return 0;
  }
  if (n == 1) {
    if ((s[0] - 'a') + 1 == p)
      cout << "NO";
    else
      cout << ++s[0];
    return 0;
  }
  for (int i = 0; i < n; i++) {
    a[i] = (s[i] - 'a') + 1;
  }
  k = a[n - 1];
  for (int i = k + 1; i <= p; i++) {
    if (i == a[n - 2] || i == a[n - 3]) continue;
    a[n - 1] = i;
    for (int j = 0, v = n - 1; j < n / 2; j++, v--) {
      if (a[j] != a[v]) {
        s[n - 1] = char(i - 1 + 'a');
        cout << s;
        return 0;
      }
    }
  }
  a[n - 1] = k;
  for (int i = n - 2; i > -1; i--) {
    if (a[i] != p) {
      k = a[i];
      for (int j = k + 1; j <= p; j++) {
        if (i == 0 || (i == 1 && j != a[i - 1]) ||
            (i > 1 && j != a[i - 1] && j != a[i - 2])) {
          a[i] = j;
          if (a[i] == 1)
            x = 2, y = 3, z = 1;
          else if (a[i] == 2)
            x = 1, y = 3, z = 2;
          else
            x = 1, y = 2, z = 3;
          if (i > 0 && x == a[i - 1]) swap(x, y);
          for (int e = i + 1, f = 0; e < n; e++, f = (f + 1) % 3) {
            if (f == 0)
              a[e] = x;
            else if (f == 1)
              a[e] = y;
            else
              a[e] = z;
          }
          for (int e = 0, v = n - 1; e < n / 2; e++, v--) {
            if (a[e] != a[v]) {
              for (int r = 0; r < n; r++) cout << (char)(a[r] - 1 + 'a');
              return 0;
            }
          }
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
