#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const long long linf = (1ll << 62) - 1;
const int N = 1101;
int n, k;
char s[N];
bool dp[N][28][28][2];
vector<char> ans;
bool write_answer(int i, int j, int z, int l) {
  if (!dp[i][j][z][l]) return false;
  if (i == n && l) return true;
  for (int x = l ? 0 : s[i]; x < k; x++) {
    if (j == x || z == x) continue;
    int ni = i + 1, nj = z, nz = x, nl = l || x > s[i];
    ans.push_back(x + 'a');
    if (write_answer(ni, nj, nz, nl)) return true;
    ans.pop_back();
  }
  return false;
}
int main() {
  cin >> n >> k >> s;
  for (int i = 0; i < n; i++) s[i] -= 'a';
  if (n == 1) {
    if (s[0] == k - 1)
      puts("NO");
    else {
      s[0] += 'a' + 1;
      printf("%s\n", s);
    }
    return 0;
  }
  for (int i = 0; i <= n; i++)
    for (int j = 0; j < k; j++)
      for (int z = 0; z < k; z++)
        for (int l = 0; l < 2; l++) dp[i][j][z][l] = 0;
  for (int i = 0; i < k; i++)
    for (int j = 0; j < k; j++) dp[n][i][j][1] = 1;
  for (int i = n - 1; i >= 0; i--)
    for (int j = 0; j < k; j++)
      for (int z = 0; z < k; z++)
        for (int l = 0; l < 2; l++) {
          for (int x = 0; x < k; x++) {
            if (x < s[i] && !l) continue;
            if (j == x || z == x) continue;
            int ni = i + 1, nj = z, nk = x, nl = x > s[i] || l;
            dp[i][j][z][l] = dp[i][j][z][l] || dp[ni][nj][nk][nl];
          }
        }
  for (int i = s[0]; i < k; i++)
    for (int j = i > s[0] ? 0 : s[1]; j < k; j++)
      if (i != j && write_answer(2, i, j, i != s[0] || j != s[1])) {
        printf("%c%c", (char)(i + 'a'), (char)(j + 'a'));
        for (int z = 0; z < ((int)(ans).size()); z++) printf("%c", ans[z]);
        puts("");
        return 0;
      }
  puts("NO");
  return 0;
}
