#include <bits/stdc++.h>
using namespace std;
const long double E = 1e-4;
const int MOD = 1e9 + 7;
const long long MAX = 5e5;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(20);
  int n, q;
  cin >> n >> q;
  string st;
  cin >> st;
  char *s = new char[n + 2];
  s += 2;
  for (int i = 0; i < n; i++) s[i] = st[i];
  s[-1] = s[-2] = '!';
  for (int i = n - 1; i >= 0; i--) {
    for (int j = (s[i] - 'a' + 1); j < q; j++) {
      char c = 'a' + j;
      if (c != s[i - 1] && c != s[i - 2]) {
        s[i] = c;
        bool bol = true;
        for (int z = i + 1; z < n; z++) {
          bool check = false;
          for (int q = 0; q < n; q++) {
            char c = 'a' + q;
            if (c != s[z - 1] && c != s[z - 2]) {
              check = true;
              s[z] = c;
              break;
            }
          }
          if (!check) {
            bol = false;
            break;
          }
        }
        if (!bol) {
          for (int z = i; z < n; z++) s[i] = st[i];
          continue;
        }
        for (int z = 0; z < n; z++) cout << s[z];
        return 0;
      }
    }
  }
  cout << "NO";
}
