#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, p;
  cin >> n >> p;
  vector<char> alphabets;
  for (long long i = 0; i < p; i++) alphabets.emplace_back((char)('a' + i));
  string s;
  cin >> s;
  auto max = [](long long a, long long b) {
    if (a > b) return a;
    return b;
  };
  char str[n];
  for (long long i = 0; i < n; i++) str[i] = s[i];
  if (p == 1) {
    cout << "NO" << '\n';
    return 0;
  }
  if (p == 2) {
    if (n == 1) {
      if (s[0] == alphabets[0]) {
        cout << alphabets[1] << '\n';
      } else
        cout << "NO" << '\n';
      return 0;
    }
    if (s[0] == alphabets[0] && s[1] == alphabets[1]) {
      cout << alphabets[1] << alphabets[0] << '\n';
      return 0;
    }
    cout << "NO" << '\n';
    return 0;
  }
  for (long long i = n - 1; i >= 1; i--) {
    str[i]++;
    while (str[i] <= alphabets[p - 1]) {
      if (str[i] == str[i - 1] || str[i] == str[max(i - 2, 0)]) {
        str[i]++;
        continue;
      }
      if (str[i] != 'a' && str[i] != 'b' && str[i] != 'c') {
        if (str[i - 1] != 'a') {
          for (long long j = i + 1; j < n; j++) {
            str[j] = (char)('a' + (j - i - 1) % 3);
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        } else {
          long long count = 0;
          for (long long j = i + 1; j < n; j++) {
            if (count % 3 == 0)
              str[j] = 'b';
            else if (count % 3 == 1)
              str[j] = 'a';
            else
              str[j] = 'c';
            count++;
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        }
      }
      if (str[i] == 'b') {
        if (str[i - 1] != 'a') {
          long long count = 0;
          for (long long j = i + 1; j < n; j++) {
            if (count % 3 == 0)
              str[j] = 'a';
            else if (count % 3 == 1)
              str[j] = 'c';
            else
              str[j] = 'b';
            count++;
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        } else {
          long long count = 0;
          for (long long j = i + 1; j < n; j++) {
            if (count % 3 == 0)
              str[j] = 'c';
            else if (count % 3 == 1)
              str[j] = 'a';
            else
              str[j] = 'b';
            count++;
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        }
      }
      if (str[i] == 'c') {
        if (str[i - 1] != 'a') {
          for (long long j = i + 1; j < n; j++) {
            str[j] = (char)('a' + (j - i - 1) % 3);
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        } else {
          long long count = 0;
          for (long long j = i + 1; j < n; j++) {
            if (count % 3 == 0)
              str[j] = 'b';
            else if (count % 3 == 1)
              str[j] = 'a';
            else
              str[j] = 'c';
            count++;
          }
          for (long long i = 0; i < n; i++) cout << str[i];
          cout << '\n';
          return 0;
        }
      }
      str[i]++;
    }
  }
  str[0]++;
  while (str[0] <= alphabets[p - 1]) {
    if (str[0] != 'b') {
      long long count = 0;
      for (long long j = 1; j < n; j++) {
        if (count % 3 == 0)
          str[j] = 'a';
        else if (count % 3 == 1)
          str[j] = 'b';
        else
          str[j] = 'c';
        count++;
      }
      for (long long i = 0; i < n; i++) cout << str[i];
      cout << '\n';
      return 0;
    } else {
      long long count = 0;
      for (long long j = 1; j < n; j++) {
        if (count % 3 == 0)
          str[j] = 'a';
        else if (count % 3 == 1)
          str[j] = 'c';
        else
          str[j] = 'b';
        count++;
      }
      for (long long i = 0; i < n; i++) cout << str[i];
      cout << '\n';
      return 0;
    }
    str[0]++;
  }
  cout << "NO" << '\n';
  return 0;
}
