#include <bits/stdc++.h>
using namespace std;
int n, p;
char str[10001];
int mem[1001][1001];
char GetMin(int m1, int m2) {
  m1 -= 'a';
  m2 -= 'a';
  for (int i = 0; i < p; i++) {
    if (i != m1 && i != m2) return i + 'a';
  }
  return 'a';
}
string nextString(string str, bool &isGood) {
  isGood = true;
  string res = str;
  bool bOk = false;
  for (int i = str.length() - 1; i >= 0; i--) {
    char c = str[i] + 1;
    while ((c - 'a') < p && c <= 'z') {
      isGood = true;
      if (i - 1 >= 0) {
        if (c == res[i - 1]) {
          isGood = false;
        }
      }
      if (i - 2 >= 0) {
        if (c == res[i - 2]) isGood = false;
      }
      if (isGood) {
        bOk = true;
        break;
      }
      c++;
    }
    if (bOk) {
      res[i] = c;
      int cnt = 0;
      for (int j = i + 1; j < str.length(); j++) {
        res[j] = GetMin((j - 1 >= 0) ? res[j - 1] : 'A',
                        (j - 2 >= 0) ? res[j - 2] : 'B');
        cnt = (cnt + 1) % 3;
      }
      break;
    } else {
      res[i] = 'a';
    }
  }
  if (!bOk) res = "";
  return res;
}
bool IsPalin(string str) {
  int l = str.length() - 1;
  int i = 0;
  if (l < 1) return false;
  while (i < l) {
    if (str[i++] != str[l--]) return false;
  }
  return true;
}
bool CheckSub(string str, int i, int j) {
  return false;
  if (i >= j || i >= str.length() || j < 0) return false;
  if (mem[i][j]) return (mem[i][j] == 1);
  bool r1, r2, r3;
  r1 = r2 = r3 = false;
  r1 = IsPalin(str.substr(i, (j - i) + 1));
  if (!r1) r2 = CheckSub(str, i, j - 1);
  if (!r1 && !r2) r3 = CheckSub(str, i + 1, j);
  if (r1 || r2 || r3)
    mem[i][j] = 1;
  else
    mem[i][j] = 2;
  return r1 || r2 || r3;
}
bool preTest(string str) {
  for (int i = 0; i < str.length() - 2; i++) {
    if (str[i] == str[i + 1]) return true;
  }
  return false;
}
int main() {
  bool bGotIt = false;
  string str;
  string res = "NO";
  cin >> n >> p;
  cin >> str;
  string nxtString = str;
  bool isGood;
  while ((nxtString = nextString(str, isGood)) != "") {
    str = nxtString;
    memset(mem, 0, sizeof(mem));
    if (CheckSub(nxtString, 0, nxtString.length() - 1) == false) {
      res = nxtString;
      break;
    }
  }
  cout << res << endl;
  return 0;
}
