302 4
abdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcb
 300 3
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc
 10 10
fajegfaicb
 70 4
dcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbd
 100 4
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca
 5 5
aceba
 3 4
cdb
 2 2
ab
 11 3
abcabcabcab
 3 26
yzx
 2 4
cd
 7 26
zyxzyxz
 3 3
acb
 1 2
a
 77 7
cadgbagbcaecgfaegcdbeafbacbdfgaedgcdeabgebaecbeacgfebagedcegdafdgeacegfegfegf
 1 26
o
 10 3
cbacbacbac
 10 5
abcabcabca
 26 26
ahnxdnbfcriersyzdihuecojdi
 1 2
b
 13 7
gfegfegfegfeg
 1 1
a
 6 3
acbacb
 17 26
bazyxzyxzyxzyxzyx
 12 10
abcabcabcabc
 333 5
edcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedc
 1 26
z
 3 3
cab
 15 11
cgjkbadjfbdaikj
 6 3
abcabc
 17 4
dabcadcbdcadbcdbc
 30 7
cedcfedcfgcfgcbadcadgfaegfacgf
 30 26
abcabcabczyxzyxzyxzyxzyxzyxzyx
 2 2
ba

acbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbac
 acbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacb
 fajegfaicd
 NO
 abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcd
 acebc
 dab
 ba
 acbacbacbac
 zab
 da
 NO
 bac
 b
 cadgbagbcaecgfaegcdbeafbacbdfgaedgcdeabgebaecbeacgfebagedcegdafdgeacfabcabcab
 p
 NO
 abcabcabcd
 ahnxdnbfcriersyzdihuecojdk
 NO
 NO
 NO
 bacbac
 bcabcabcabcabcabc
 abcabcabcabd
 NO
 NO
 cba
 cgjkbadjfbdajba
 acbacb
 dabcadcbdcadcabca
 cedcfedcfgcfgcbadcadgfaegfadba
 abcabcabdabcabcabcabcabcabcabc
 NO

#include<bits/stdc++.h>
#include <chrono>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define MOD 1000000007
#define PI 3.14159265
#define INF 1000000000000000000
#define pll pair<ll,ll>
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define vll vector<ll>
#define all(a) a.begin(),a.end()
#define forl(i,n) for(ll i=0;i<n;i++)
#define fore(i,n) for(ll i=1;i<=n;i++)
#define MAXN 10000005

ll max(ll a,ll b)
{
    if(a>b)
    return a;
    return b;
}
 
ll min(ll a,ll b)
{
    return a+b-max(a,b);
}
ll mulmod(ll a, ll b, ll mod) 
{ 
    /*ll res = 0; // Initialize result 
    a = a % mod; 
    while (b > 0) 
    { 
        // If b is odd, add 'a' to result 
        if (b % 2 == 1) 
            res = (res + a) % mod; 
 
        // Multiply 'a' with 2 
        a = (a * 2) % mod; 
 
        // Divide b by 2 
        b /= 2; 
    } 
 
    // Return result 
    return res % mod; */
    return ((a%MOD)*(b%MOD)%MOD);
}
ll mod(ll a,ll b)
{
    if(a>b)
    return a-b;
    else
    return b-a;
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;      
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x)%p;
        y = y>>1; 
        x = (x*x)%p;  
    }
    return res;
 
}
template<class T> istream& operator >> (istream &is , vector<T> &v) { for(T &a : v) is >> a; return is; }
int bits(ll n)
{
    ll ctr=0;
    while(n)
    {
        n/=10;
        ctr++;
    }
    return ctr;
}
// bool cmp(pll p1,pll p2)
// {
//     if(p1.f<p2.f)
//     return true;
//     if(p1.f==p2.f)
//     return p1.s>p2.s;
//     return false;
// }
vector<ll> z_function(string s) {
   ll n = (ll) s.length();
   vector<ll> z(n);
   for (ll i = 1, l = 0, r = 0; i < n; ++i) {
      if (i <= r)
         z[i] = min (r - i + 1, z[i - l]);
      while (i + z[i] < n && s[z[i]] == s[i + z[i]])
         ++z[i];
      if (i + z[i] - 1 > r)
         l = i, r = i + z[i] - 1;
   }
   return z;
}
vll bits1(ll n)
{
    vll res;
    while(n)
    {
        res.pb(n%10);
        n/=10;
    }
    reverse(all(res));
    return res;
}
ll lcm(ll a,ll b,ll c)
{
    ll rets = (a*b)/(__gcd(a,b));
    return (rets*c)/(__gcd(rets,c));
}
bool prime[10002];
 
void prep()
{
    
    memset(prime, true, sizeof(prime)); 
    prime[1] = false;
    for (int p=2; p*p<=10000; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (int i=p*p; i<=10000; i += p) 
                prime[i] = false; 
        } 
    } 
    return;
}
ll modInv(ll x)
{
    return power(x,MOD-2,MOD);
}
ll fact[200005];
ll ncr(ll n,ll r)
{
    ll x = fact[n];
    ll y = fact[n-r];
    ll z = fact[r];
    ll ff = (y*z)%MOD;
    ll gg1 = modInv(ff);
    return (gg1*x)%MOD;
}
// ll prob(ll x,ll y)
// {
//     return (x*modInv(y))%MOD;
// }
// ll dist(ll x1,ll y1,ll x2,ll y2)
// {
//     return mod(x1,x2)+mod(y1,y2);
// }

ll logs(ll x)
{
    ll tot = 0;
    ll n = x;
    while(x>0)
    {
        x/=2;
        tot++;
    }
    return tot;
}



ll case_no = 1;
void op()
{
    cout<<"Case #"<<case_no<<": ";
    case_no++;
    
}
ll f(ll a,ll b,ll c)
{
    return (a-b)*(a-b) + (b-c)*(b-c) + (c-a)*(c-a);
}
ll gg(ll x)
{
    ll ctr = 0;
    while(x>1)
    {
        x/=2;
        ctr++;
    }
    return ctr;
}

vector<int> bit;
int getSum( int index) 
{ 
    int sum = 0; // Iniialize result 
  
    // index in BITree[] is 1 more than the index in arr[] 
    index = index + 1; 
  
    // Traverse ancestors of BITree[index] 
    while (index>0) 
    { 
        // Add current element of BITree to sum 
        sum += bit[index]; 
  
        // Move index to parent node in getSum View 
        index -= index & (-index); 
    } 
    return sum; 
} 

// Updates a node in Binary Index Tree (BITree) at given index 
// in BITree. The given value 'val' is added to BITree[i] and  
// all of its ancestors in tree. 
void update(int n, int index, int val) 
{ 
    // index in BITree[] is 1 more than the index in allrr[] 
    index = index + 1; 
    while (index <= n) 
    { 
    bit[index] += val; 
    index += index & (-index); 
    } 
}

bool check(string str)
{
    ll n = str.size();
    for(ll i=0;i<n-1;i++)
    {
        if(str[i]==str[i+1])
        return false;
        if(i+2<n && str[i]==str[i+2])
        return false;
    }
    return true;
}
void solve()
{
    string res = "NO";
    ll n,p;
    cin>>n>>p;
    string str;
    cin>>str;
    ll cur = n-1;
    while(cur>=0)
    {
        //cout<<str<<"\n";
        if(str[cur]-'a' == (p-1))
        {
            
            while(cur>=0 && str[cur]-'a' == (p-1))
            {
                str[cur]='a';
                cur--;
            }
            str[cur] = char(int(str[cur])+1);
            
            bool f = true;
            while(true)
            {
                if(cur>0 && str[cur]==str[cur-1])
                {
                    if(str[cur]-'a' == (p-1))
                    {
                    f=false;
                    str[cur]='a';
                    cur--;
                    }
                    else
                    {
                        f=true;
                        break;
                    }
                }
                else
                {
                    f=false;
                    break;
                }
            }
            if(cur<0)
            break;
            
            if(cur<0 || (cur==0 && str[cur]-'a' == p-1 && f))
            break;
            if(f)
            str[cur] = char(int(str[cur])+1);
            if(check(str))
            {
                res = str;
                break;
            }
            cur = n-1;;
            
        }
        else
        {
            str[cur] = char(int(str[cur])+1);
            if(check(str))
            {
                res = str;
                break;
            }
        }
    }
    cout<<res;
    
}
int main()
{
    fastio;
    
   
    ll t;
    //cin>>t;
    t = 1;
    
    //prep();
    while(t--)
    {
        solve();
        
    }
   
 
    
}