#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int dp[N][33][33];
int n, p;
bool f(int i, int a, int b) {
  if (i == n) return true;
  int &ans = dp[i][a][b];
  if (~ans) return ans;
  ans = 0;
  for (int c = 0; c < p; c++)
    if (c != a and c != b) {
      return ans = 1;
      ans |= f(i + 1, b, c);
    }
  return ans;
}
char str[N];
int main() {
  memset(dp, -1, sizeof dp);
  scanf("%d %d %s", &n, &p, str);
  int k = -1;
  for (int i = n - 1; i >= 0; i--) {
    int a = i - 2 >= 0 ? int(str[i - 2] - 'a') : p;
    int b = i - 1 >= 0 ? int(str[i - 1] - 'a') : p;
    int c = -1;
    for (int j = int(str[i] - 'a') + 1; j < p; j++) {
      if (j != b and j != a) {
        if (f(i + 1, b, j)) {
          c = j;
          break;
        }
      }
    }
    if (c != -1) {
      str[i] = char('a' + c);
      k = i;
      break;
    }
  }
  if (k == -1) return printf("NO\n"), 0;
  for (int i = k + 1; i < n; i++) {
    int c = -1;
    int a = i - 2 >= 0 ? int(str[i - 2] - 'a') : p;
    int b = i - 1 >= 0 ? int(str[i - 1] - 'a') : p;
    for (int j = 0; j < p; j++)
      if (j != a and j != b) {
        if (f(i + 1, b, j)) {
          c = j;
          break;
        }
      }
    str[i] = char('a' + c);
  }
  printf("%s\n", str);
}
