#include <bits/stdc++.h>
using namespace std;
int n, p;
char s[2000];
int FLAG = 0;
bool next(int &i) {
  s[i]++;
  for (int j = i + 1; j < n; j++) s[j] = 'a';
  if (s[i] == 'a' + p) {
    while (i && s[i] >= 'a' + p) {
      s[i] = 'a';
      s[--i]++;
    }
    if (s[0] >= 'a' + p) FLAG = 1;
    return s[0] >= 'a' + p;
  }
  return 0;
}
int dfs(int i) {
  if (i == n) return 1;
  if (i >= 1) {
    if (s[i] == s[i - 1]) {
      if (next(i)) return 0;
      return dfs(i);
    }
  }
  if (i >= 2) {
    if (s[i] == s[i - 2]) {
      if (next(i)) return -1;
      return dfs(i);
    }
  }
  if (dfs(i + 1)) {
    return 1;
  } else {
    for (int j = i + 1; j < n; j++) s[j] = 'a';
    if (s[i] == s[i - 1])
      if (next(i)) return 0;
    return dfs(i);
  }
}
int main() {
  cin >> n >> p >> s;
  int i = n - 1;
  if (next(i) || !dfs(0) || FLAG) {
    cout << "NO" << endl;
  } else
    cout << s << endl;
  return 0;
}
