#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, P;
  cin >> N >> P;
  string str;
  cin >> str;
  for (int i = N - 1; i >= 0; --i) {
    string cur = str;
    for (char c1 = cur[i] + 1; c1 < 'a' + P; ++c1) {
      if (i >= 1 && cur[i - 1] == c1) continue;
      if (i >= 2 && cur[i - 2] == c1) continue;
      cur[i] = c1;
      for (int k = i + 1; k < N; ++k) {
        for (char c2 = 'a'; c2 < 'a' + P; ++c2) {
          if (k >= 1 && cur[k - 1] == c2) continue;
          if (k >= 2 && cur[k - 2] == c2) continue;
          cur[k] = c2;
          break;
        }
      }
      cout << cur << '\n';
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
