#include <bits/stdc++.h>
int mark[30], a[1009], n, p, b[1009];
using namespace std;
int possible(int i) {
  int k, j, l, flag = 0;
  if (a[i] == p) return 0;
  for (j = a[i] + 1; j <= p; j++) {
    if (i >= 2) {
      if (j != a[i - 1] && j != a[i - 2]) {
        for (k = 0; k < n; k++) b[k] = a[k];
        b[i] = j;
        for (k = i + 1; k < n; k++) {
          flag = 0;
          for (l = 1; l <= p; l++) {
            if (l != b[k - 1] && l != b[k - 2]) {
              flag = 1;
              b[k] = l;
              break;
            }
          }
          if (flag == 0) break;
        }
        if (k == n) {
          for (k = 0; k < n; k++) cout << (char)(b[k] + 'a' - 1);
          cout << endl;
          return 1;
        }
      }
    } else if (i == 1) {
      if (j != a[i - 1]) {
        for (k = 0; k < n; k++) b[k] = a[k];
        b[i] = j;
        for (k = i + 1; k < n; k++) {
          flag = 0;
          for (l = 1; l <= p; l++) {
            if (l != b[k - 1] && l != b[k - 2]) {
              flag = 1;
              b[k] = l;
              break;
            }
          }
          if (flag == 0) break;
        }
        if (k == n) {
          for (k = 0; k < n; k++) cout << (char)(b[k] + 'a' - 1);
          cout << endl;
          return 1;
        }
      }
    } else {
      for (k = 0; k < n; k++) b[k] = a[k];
      b[i] = j;
      for (k = i + 1; k < n; k++) {
        flag = 0;
        for (l = 1; l <= p; l++) {
          if (k == 1) {
            if (l != b[k - 1]) {
              flag = 1;
              b[k] = l;
              break;
            }
          } else {
            if (l != b[k - 1] && l != b[k - 2]) {
              flag = 1;
              b[k] = l;
              break;
            }
          }
        }
        if (flag == 0) break;
      }
      if (k == n) {
        for (k = 0; k < n; k++) cout << (char)(b[k] + 'a' - 1);
        cout << endl;
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  int i, j;
  cin >> n >> p;
  char x;
  for (i = 0; i < n; i++) {
    cin >> x;
    a[i] = x - 'a' + 1;
  }
  i = n - 1;
  while (i >= 0 && !possible(i)) i--;
  if (i < 0) cout << "NO" << endl;
  return 0;
}
