#include <bits/stdc++.h>
using namespace std;
char s[1005];
char mm;
bool dfs(int now) {
  if (now == -1) return false;
  for (int i = 1; i + s[now] < mm; i++) {
    if (now > 0 && s[now] + i == s[now - 1]) continue;
    if (now > 1 && s[now] + i == s[now - 2]) continue;
    s[now] += i;
    return true;
  }
  if (!dfs(now - 1)) return false;
  s[now] = 'a';
  for (int i = 0; i + s[now] < mm; i++) {
    if (now > 0 && s[now] + i == s[now - 1]) continue;
    if (now > 1 && s[now] + i == s[now - 2]) continue;
    s[now] += i;
    return true;
  }
  return false;
}
int main() {
  int n, p;
  scanf("%d%d", &n, &p);
  scanf("%s", s);
  mm = 'a' + p;
  if (!dfs(n - 1)) {
    printf("NO\n");
  } else
    printf("%s", s);
  return 0;
}
