#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int N, P;
  string s;
  cin >> N >> P >> s;
  for (int i = N - 1; i >= 0; i--)
    for (int j = s[i] - 'a' + 1; j < P; j++) {
      if (i > 0 && j == s[i - 1] - 'a') continue;
      if (i > 1 && j == s[i - 2] - 'a') continue;
      string q = s;
      q[i] = 'a' + j;
      if (i == N - 1) {
        cout << q << "\n";
        return 0;
      }
      for (int k = i + 1; k < N; k++) {
        bool ok = false;
        for (int c = 0; c < P; c++) {
          if (k > 0 && c == q[k - 1] - 'a') continue;
          if (k > 1 && c == q[k - 2] - 'a') continue;
          ok = true;
          q[k] = c + 'a';
          break;
        }
        if (!ok) break;
        if (k == N - 1) {
          cout << q << "\n";
          return 0;
        }
      }
    }
  cout << "NO\n";
  return 0;
}
