#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, p;
  string s;
  cin >> n >> p >> s;
  int flag = s.size() - 1;
  bool yes = 0;
  while (1) {
    if (flag == 0) {
      if (s[0] == 'a' + p - 1)
        break;
      else {
        yes = 1;
        s[0]++;
      }
    } else if (flag == 1) {
      for (char c = s[flag] + 1; c < 'a' + p; c++)
        if (c != s[0]) {
          s[flag] = c;
          yes = 1;
          break;
        }
    } else {
      for (char c = s[flag] + 1; c < 'a' + p; c++)
        if (c != s[flag - 1] && c != s[flag - 2]) {
          s[flag] = c;
          yes = 1;
          break;
        }
    }
    if (yes || flag == 0) break;
    flag--;
  }
  if (yes) {
    for (int i = flag + 1; i < s.size(); i++) {
      bool tmp = 0;
      if (i == 1) {
        for (char c = 'a'; c < 'a' + p; c++)
          if (c != s[0]) {
            tmp = 1;
            s[i] = c;
            break;
          }
      } else {
        for (char c = 'a'; c < 'a' + p; c++)
          if (c != s[i - 1] && c != s[i - 2]) {
            tmp = 1;
            s[i] = c;
            break;
          }
      }
      if (!tmp) {
        yes = 0;
        break;
      }
    }
    if (yes)
      cout << s << endl;
    else
      cout << "NO\n";
  } else
    cout << "NO\n";
  return 0;
}
