import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        //(new FileReader("input.in"));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;
        //PrintWriter pw = new PrintWriter("output.out", "UTF-8");

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken()), p = parseInt(tk.nextToken()) - 1;
        String str = in.readLine();

        str = "00" + str + "00";
        boolean f = true;

        char[] s = str.toCharArray();

        for(int i=s.length-3; i>=2; i--) {
            int k = s[i]-'a'+1;
            for(; k<=p; k++) {
                char c = (char)(k+'a');
                if(c!=s[i+1] && c!=s[i+2] && c!=s[i-1] && c!=s[i-2]) {
                    s[i] = c;
                    break;
                }
            }

            if(k>p && i>2) s[i] = 'a';
            else if(k>p) {
                System.out.println("NO");
                return;
            } else break;
        }

        out:
        for (int i = str.length() - 3; i >= 2; i--) {
            if (s[i] == s[i + 1] || s[i] == s[i + 2] || s[i] == s[i - 1] || s[i] == s[i - 2]) {
                int j = i;
                while (j >= 2) {
                    int k = s[i] - 'a';
                    for (; k <= p; k++) {
                        char c = (char) (k + 'a');
                        if (c != s[i + 1] && c != s[i + 2] && c != s[i - 1] && c != s[i - 2]) {
                            s[i] = c;
                            break;
                        }
                    }
                    if (k > p) {
                        k = s[i] - 'a';
                        for (; k <= p; k++) {
                            char c = (char) (k + 'a');
                            if (c != s[i + 1] && c != s[i + 2]) {
                                s[i] = c;
                                break;
                            }
                        }

                        if (k > p) {
                            f = false;
                            break out;
                        } else if (j > 2) {
                            j--;
                        } else {
                            f = false;
                            break out;
                        }
                    } else j--;

                }
            }
        }

        String s2 = valueOf(s).replace("0", "");
        str = str.replace("0", "");
        if (f && !s2.equals(str)) {
            System.out.println(s2);
        } else {
            System.out.println("NO");
        }
    }

}


import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        //(new FileReader("input.in"));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;
        //PrintWriter pw = new PrintWriter("output.out", "UTF-8");

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken()), p = parseInt(tk.nextToken()) - 1;
        String str = in.readLine();

        if(p==0 || (p==1 && n>2)) {
            System.out.println("NO");
            return;
        }

        str = "00" + str + "00";
        boolean f = true;

        char[] s = str.toCharArray();

        int i;
        for(i=s.length-3; i>=2; i--) {
            int k = s[i]-'a'+1;
            for(; k<=p; k++) {
                char c = (char)(k+'a');
                if(c!=s[i+1] && c!=s[i+2] && c!=s[i-1] && c!=s[i-2]) {
                    s[i] = c;
                    break;
                }
            }

            if(k>p && i>2) s[i] = 'a';
            else if(k>p) {
                System.out.println("NO");
                return;
            } else break;
        }
        i++;

        out :
        for(; i<=s.length-3; i++) {
            int k=s[i]-'a';
            for(; k<=p; k++) {
                char c = (char)(k+'a');
                if(c!=s[i-1] && c!=s[i-2]) {
                    s[i] = c;
                    break;
                }
            }

            if(k > p) {
                f = false;
                break;
            }
        }

        String s2 = valueOf(s).replace("0", "");
        str = str.replace("0", "");
        if (f && !s2.equals(str)) {
            System.out.println(s2);
        } else {
            System.out.println("NO");
        }
    }

}


import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        //(new FileReader("input.in"));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;
        //PrintWriter pw = new PrintWriter("output.out", "UTF-8");

        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken()), p = parseInt(tk.nextToken()) - 1;
        String str = in.readLine();

        str = "00" + str + "00";
        boolean f = true;

        char[] s = str.toCharArray();

        for(int i=s.length-3; i>=2; i--) {
            if(s[i]!=(char)(p+'a')) {
                s[i]++;
                for(int j=i+1; j<=s.length-3; j++)
                    s[j] = 'a';
                break;
            }
        }

        out:
        for (int i = str.length() - 3; i >= 2; i--) {
            if (s[i] == s[i + 1] || s[i] == s[i + 2] || s[i] == s[i - 1] || s[i] == s[i - 2]) {
                int j = i;
                while (j >= 2) {
                    int k = s[i] - 'a';
                    for (; k <= p; k++) {
                        char c = (char) (k + 'a');
                        if (c != s[i + 1] && c != s[i + 2] && c != s[i - 1] && c != s[i - 2]) {
                            s[i] = c;
                            break;
                        }
                    }
                    if (k > p) {
                        k = s[i] - 'a';
                        for (; k <= p; k++) {
                            char c = (char) (k + 'a');
                            if (c != s[i + 1] && c != s[i + 2]) {
                                s[i] = c;
                                break;
                            }
                        }

                        if (k > p) {
                            f = false;
                            break out;
                        } else if (j > 2) {
                            j--;
                        } else {
                            f = false;
                            break out;
                        }
                    } else j--;

                }
            }
        }

        String s2 = valueOf(s).replace("0", "");
        str = str.replace("0", "");
        if (f && !s2.equals(str)) {
            System.out.println(s2);
        } else {
            System.out.println("NO");
        }
    }

}


import java.io.*;
import java.util.*;

public class test {
    int INF = (int)1e9;
    long MOD = 1000000007;

    String go(String s, int n) {
        loop: while(s.length()!=n) {
            for(char c='a'; c<='c'; c++) {
                if(s.length()>0 && s.charAt(s.length()-1)==c) continue;
                if(s.length()>1 && s.charAt(s.length()-2)==c) continue;
                s = s + c;
                continue loop;
            }
            return "";
        }
        return s;
    }

    void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int p = in.nextInt();
        String s = in.next();
        if(p<=1) {
            out.println("NO");
            return;
        }
        if(p==2) {
            if(s.equals("ab")) out.println("ba");
            else if(s.equals("ba") || s.equals("b")) out.println("NO");
            else if(s.equals("a")) out.println("b");
            return ;
        }
        for(int i=n-1; i>=0; i--) {
            String t = s.substring(0, i);
            //System.out.println("tis t: "+t);
            for(char c=(char)(s.charAt(i)+1); c<=(char)('a'+p-1); c++) {
                if(t.length()>0 && t.charAt(t.length()-1)==c) continue;
                if(t.length()>1 && t.charAt(t.length()-2)==c) continue;
                //System.out.println("sending: "+t+c);
                String rs = go(t+c, n);
                if(rs.length()==n) {
                    out.println(rs);
                    return;
                }
            }
        }
        out.println("NO");
    }

    public static void main(String[] args) throws IOException {
        if(args.length>0 && args[0].equalsIgnoreCase("d")) {
            DEBUG_FLAG = true;
        }
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;//in.nextInt();
        long start = System.nanoTime();
        while(t-- >0) {
            new test().solve(in, out);
        }
        long end = System.nanoTime();
        debug("\nTime: " + (end-start)/1e6 + " \n\n");
        out.close();
    }

    static boolean DEBUG_FLAG = false;
    static void debug(String s) {
        if(DEBUG_FLAG) System.out.print(s);
    }

    static class InputReader {
        static BufferedReader br;
        static StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}


import java.io.*;
import java.util.*;

public class test {
    int INF = (int)1e9;
    long MOD = 1000000007;

    String go(String s, int n) {
        loop: while(s.length()!=n) {
            for(char c='a'; c<='c'; c++) {
                if(s.length()>0 && s.charAt(s.length()-1)==c) continue;
                if(s.length()>1 && s.charAt(s.length()-2)==c) continue;
                s = s + c;
                continue loop;
            }
            return "";
        }
        return s;
    }

    void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int p = in.nextInt();
        String s = in.next();
        if(p<=1) {
            out.println("NO");
            return;
        }
        if(p==2) {
            if(s.equals("ab")) out.println("ba");
            else if(s.equals("ba")) out.println("NO");
            return;
        }
        for(int i=n-1; i>=0; i--) {
            String t = s.substring(0, i);
            //System.out.println("tis t: "+t);
            for(char c=(char)(s.charAt(i)+1); c<=(char)('a'+p-1); c++) {
                if(t.length()>0 && t.charAt(t.length()-1)==c) continue;
                if(t.length()>1 && t.charAt(t.length()-2)==c) continue;
                //System.out.println("sending: "+t+c);
                String rs = go(t+c, n);
                if(rs.length()==n) {
                    out.println(rs);
                    return;
                }
            }
        }
        out.println("NO");
    }

    public static void main(String[] args) throws IOException {
        if(args.length>0 && args[0].equalsIgnoreCase("d")) {
            DEBUG_FLAG = true;
        }
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;//in.nextInt();
        long start = System.nanoTime();
        while(t-- >0) {
            new test().solve(in, out);
        }
        long end = System.nanoTime();
        debug("\nTime: " + (end-start)/1e6 + " \n\n");
        out.close();
    }

    static boolean DEBUG_FLAG = false;
    static void debug(String s) {
        if(DEBUG_FLAG) System.out.print(s);
    }

    static class InputReader {
        static BufferedReader br;
        static StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a'){
					if(arr[index] - 'a' == p-1){
						arr[index+1] = 'b';
					}
					else{
						arr[index+1] = (char)(arr[index] - 'a' + 1);
					}
					index++;
				}

			}

			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a')
					j = 1;
			}

			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			if(n == 1){
				if((int)arr[0]-(int)'a' + 1 < p)
					out.println((char)((int)arr[0]+1));
				else
					out.println("NO");
				return;
			}

			if(n == 2){
				if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]){
					arr[1] = (char)((int)arr[1]+1);
					out.println(arr);
				}

				else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]){
					arr[2] = (char)((int)arr[2]+1);
					out.println(arr);
				}

				else
					out.println("NO");
			}

			else{
				int index = -1;
				for(int i = n-1; i >= 2; i--){
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break;
						}
						j++;
					}

				}

				if(index == -1){
					out.println("NO");
					return;
				}

				int j = 0;
				for(int i = index+1; i < n; i++)
					arr[i] = (char)(((int)'a')+(j%p));

				out.println(arr);
			}

		}

	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a')
					arr[index+1] = 'b'
			}

			for(int i = index+2; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			if(n == 1){
				if((int)arr[0]-(int)'a' + 1 < p)
					out.println((char)((int)arr[0]+1));
				else
					out.println("NO");
				return;
			}

			if(n == 2){
				if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
					arr[1] = (char)((int)arr[1]+1);
					out.println(arr);
				}

				else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
					arr[2] = (char)((int)arr[2]+1);
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 1 < p && (int)arr[0]-(int)'a' + 1 != (int)arr[1]-(int)'a'){
					arr[0] = (char)((int)arr[0]+1);
					arr[1] = 'a';
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 2 < p && (int)arr[0]-(int)'a' + 2 != (int)arr[1]-(int)'a'  ){
					arr[0] = (char)((int)arr[0]+2);
					arr[1] = 'a';
					out.println(arr);
				}

				else
					out.println("NO");
			}

			else{
				int index = -1;
				for(int i = n-1; i >= 2; i--){
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break;
						}
						j++;
					}

				}

				if(index == -1){
					out.println("NO");
					return;
				}

				int j = 0;
				for(int i = index+1; i < n; i++)
					arr[i] = (char)(((int)'a')+(j%p));

				out.println(arr);
			}

		}

	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a')
					arr[index+1] = 'b';
			}

			for(int i = index+2; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a')
					arr[index+1] = 'b';
					index++;
			}

			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a'){
					if(arr[index] - 'a' == p-1)
						j = 1;
					else
						j = arr[index] - 'a' + 1;
				}
			}

			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a')
					index[i+1] = 'b';
			}

			for(int i = index+2; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			if(index != 0){
				if(arr[index-1] == 'a'){
					if(arr[index] - 'a' == p-1){
						arr[index+1] = 'b';
					}
					else{
						arr[index+1] = (char)(arr[index] - 'a' + 1);
					}
				}
				index++;
			}

			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			if(n == 1){
				if((int)arr[0]-(int)'a' + 1 < p)
					out.println((char)((int)arr[0]+1));
				else
					out.println("NO");
				return;
			}

			if(n == 2){
				if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
					arr[1] = (char)((int)arr[1]+1);
					out.println(arr);
				}

				else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
					arr[2] = (char)((int)arr[2]+1);
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 1 < p){
					arr[0] = (char)((int)arr[0]+1);
					arr[1] = 'a';
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 2 < p){
					arr[0] = (char)((int)arr[0]+2);
					arr[1] = 'a';
					out.println(arr);
				}

				else
					out.println("NO");
			}

			else{
				int index = -1;
				for(int i = n-1; i >= 2; i--){
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break;
						}
						j++;
					}

				}

				if(index == -1){
					out.println("NO");
					return;
				}

				int j = 0;
				for(int i = index+1; i < n; i++)
					arr[i] = (char)(((int)'a')+(j%p));

				out.println(arr);
			}

		}

	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			if(n == 1){
				if((int)arr[0]-(int)'a' + 1 < p)
					out.println((char)((int)arr[0]+1));
				else
					out.println("NO");
				return;
			}

			if(n == 2){
				if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]){
					arr[1] = (char)((int)arr[1]+1);
					out.println(arr);
				}

				else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]){
					arr[2] = (char)((int)arr[2]+1);
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 1 < p && (int)arr[0]-(int)'a' + 1 != (int)arr[1]){
					arr[0] = (char)((int)arr[0]+1);
					arr[1] = 'a';
					out.println(arr);
				}

				else if((int)arr[0]-(int)'a'+ 2 < p && (int)arr[0]-(int)'a' + 2 != (int)arr[2]){
					arr[0] = (char)((int)arr[0]+2);
					arr[1] = 'a';
					out.println(arr);
				}

				else
					out.println("NO");
			}

			else{
				int index = -1;
				for(int i = n-1; i >= 2; i--){
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break;
						}
						j++;
					}

				}

				if(index == -1){
					out.println("NO");
					return;
				}

				int j = 0;
				for(int i = index+1; i < n; i++)
					arr[i] = (char)(((int)'a')+(j%p));

				out.println(arr);
			}

		}

	}
}


import java.util.*;
import java.io.*;

public class Solution {

	static class FastScanner implements Closeable {
	    BufferedReader in;
	    StringTokenizer st;
	    FastScanner() throws IOException {
	        in = new BufferedReader(new InputStreamReader(System.in));
	    }
	    String next() throws IOException {
	        while (st == null || !st.hasMoreTokens()) {
	            String line = in.readLine();
	            if (line == null) {
	            	return null;
	            }
	            st = new StringTokenizer(line);
	        }
	        return st.nextToken();
	    }
	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public void close() throws IOException {
	        in.close();
	        st = null;
	    }
	}

	public static void main(String[] args) throws IOException{

		try(FastScanner sc = new FastScanner();
			PrintWriter out = new PrintWriter(System.out)){

			int n = sc.nextInt();
			int p = sc.nextInt();

			char[] arr = sc.next().toCharArray();

			int index = -1;
			label:
			for(int i = n-1; i >= 0; i--){
				if(i == 0){
					if((int)arr[0]-(int)'a' + 1 < p){
						arr[0] = (char)((int)arr[0]+1);
						index = 0;
						break;
					}
				}

				else if(i == 1){
					if((int)arr[1]-(int)'a'+ 1 < p && (int)arr[1]-(int)'a' + 1 != (int)arr[0]-(int)'a'){
							arr[1] = (char)((int)arr[1]+1);
							index = i;
							break;
						}

					else if((int)arr[1]-(int)'a' + 2 < p && (int)arr[1]-(int)'a' + 2 != (int)arr[0]-(int)'a'){
						arr[2] = (char)((int)arr[2]+1);
						index = i;
						break;
					}
				}

				else{
					int j = 0;
					while(((arr[i] - 'a') + (j % p) + 1)< p){
						if(arr[i] - 'a'+j+1 != arr[i-1] - 'a' && arr[i] - 'a'+j+1 != arr[i-2] - 'a'){
							index = i;
							arr[i] = (char)((int)arr[i]+j+1);
							break label;
						}
						j++;
					}
				}
			}

			if(index == -1){
				out.println("NO");
				return;
			}

			int j = 0;
			for(int i = index+1; i < n; i++){
				arr[i] = (char)(((int)'a')+(j%p));
				j++;
			}

			out.println(arr);
		}
	}
}


import static java.lang.System.out;
import java.util.Scanner;

public class src {

	private static Scanner kbd = new Scanner(System.in);

	static boolean fold(char[] input, int index, int max) {
		if (input[index] > 97 + max) {
			input[index] = 'a';
			return true;
		}
		return false;
	}

	public static void main(String[] args) {
		char[] input = new char[1001];
		String temp;
		int len, max, index;

		len = kbd.nextInt();
		max = kbd.nextInt() - 1;
		temp = kbd.nextLine();
		temp = kbd.nextLine();
		input = temp.toCharArray();
		input[len - 1] += 1;

		index = len - 1;
		while (true) {
			if (index >= len)
				break;
			if (fold(input, index, max)) {
				if (index == 0) {
					out.print("NO");
					return;
				}
				input[index - 1]++;
				index--;
				continue;
			}
			if ((index >= 1) && (input[index] == input[index - 1])) {
				input[index]++;
				continue;
			}
			if ((index >= 2) && (input[index] == input[index - 2])) {
				input[index]++;
				continue;
			}
			index++;
		}
		out.print(input);
		return;
	}

}


    /**
     *
     * @author sarthak
     */
    import java.util.*;
    import java.math.*;
    import java.io.*;

    public class rnd256_D1_A {

        static class FastScanner {

            BufferedReader br;
            StringTokenizer st;

            public FastScanner(InputStream is) {
                br = new BufferedReader(new InputStreamReader(is));
            }

            public String next() {
                while (st == null || !st.hasMoreTokens()) {
                    try {
                        st = new StringTokenizer(br.readLine());
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
                return st.nextToken();
            }

            public String nextLine() {
                st = null;
                try {
                    return br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                    return "";
                }
            }

            public int nextInt() {
                return Integer.parseInt(next());
            }

            public long nextLong() {
                return Long.parseLong(next());
            }

            public double nextDouble() {
                return Double.parseDouble(next());
            }
        }

        static boolean check(char a[], int i){
                    if(i-1>=0 && a[i]==a[i-1]){
                            return false;
                    }
                    else if(i-2>=0 && a[i]==a[i-2]){
                            return false;
                    }
                    return true;
            }

        public static void main(String[] args) {

            FastScanner s = new FastScanner(System.in);
            StringBuilder op = new StringBuilder();

            int n = s.nextInt();
            int p = s.nextInt();
            String ip = s.nextLine();
            for (int i = n - 1; i >= 0; i--) {
                char a[] = ip.toCharArray();
                for (int j = ip.charAt(i) + 1; j < p + 'a'; j++) {
                    a[i] = (char) j;

                    if (!check(a, i)) {
                        continue;
                    }
                    for (int k = i + 1; k < n; k++) {
                        a[k] = 'a';
                        while (a[k] < 'a' + p && !check(a, k)) {
                            a[k]++;
                        }
                        if (a[k] == 'a' + p) {
                            System.out.println("NO");
                            return;
                        }
                    }
                    System.out.println(new String(a));
                    return;
                }
            }
            System.out.println("NO");

        }

    }


import java.util.Scanner;

public class a256 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int al = in.nextInt();

		char s[] = in.next().toCharArray();
		for(int i = 0; i < n; i++) {
			s[i] -= 'a';
		}

		int back = n -1;
		s[back] += 1;
		while(back > 0 && s[back] == al) {
			s[back] = 0;
			s[--back]++;
		}
		if(s[back] == al) {
			System.out.println("NO");
			return;
		}

//		for(int v : s) {
//			System.out.print((char)(v + 'a'));
//		}System.out.println();
		int front = 1;
		while(front < n) {
			boolean bad = false;
			while(s[front] == s[front - 1] || (front > 1 && s[front] == s[front-2])) {
				s[front]++;
				bad = true;
			}
//			System.out.println(bad +" " + front + " " + (int)s[front]);
			if(bad) {
				back = front;
				while(back > 0 && s[back] >= al) {
					s[back] %= al;
					s[--back]++;
				}
				if(s[back] >= al) {
					System.out.println("NO");
					return;
				}
				for(int i = front +1; i < n; i++) {
					s[i] = 0;
				}
				front = 0;
			}
			front++;
		}

		for(int v : s) {
			System.out.print((char)(v + 'a'));
		}
	}
}


// practice with rainboy
import java.io.*;
import java.util.*;

public class CF464A extends PrintWriter {
	CF464A() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF464A o = new CF464A(); o.main(); o.flush();
	}

	void main() {
		int n = sc.nextInt();
		int p = sc.nextInt();
		if (p == 1) {
			println("NO");
			return;
		}
		byte[] cc = sc.next().getBytes();
		if (p == 2) {
			if (cc[0] == 'a') {
				cc[0] = 'b';
				if (n == 2)
					cc[1] = 'a';
				println(new String(cc));
			} else
				println("NO");
			return;
		}
		for (int i = n - 1; i >= 0; i--)
			for (byte c = (byte) (cc[i] + 1); c - 'a' < p; c++)
				if ((i - 1 < 0 || cc[i - 1] != c) && (i - 2 < 0 || cc[i - 2] != c)) {
					cc[i] = c;
					for (int j = i + 1; j < n; j++)
						for (c = 'a'; c - 'a' < p; c++)
							if ((j - 1 < 0 || cc[j - 1] != c) && (j - 2 < 0 || cc[j - 2] != c)) {
								cc[j] = c;
								break;
							}
					println(new String(cc));
					return;
				}
		println("NO");
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.InputMismatchException;

public class NoToPalindromes {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n = in.readInt();
		int p = in.readInt();
		char[] s = in.readString().toCharArray();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = s[i] - 'a';
		}
		int pos = -1;
		for (int i = n - 1; pos == -1 && i >= 0; i--) {
			for (int j = a[i] + 1; j < p; j++) {
				if (i > 0 && a[i - 1] == j || i > 1 && a[i - 2] == j) {
					continue;
				}
				a[i] = j;
				pos = i;
				break;
			}
		}
		if (pos == -1) {
			System.out.println("NO");
			return;
		}
		for (int i = pos + 1; i < n; i++) {
			for (int j = 0; j < p; j++) {
				if (i > 0 && a[i - 1] == j || i > 1 && a[i - 2] == j) {
					continue;
				}
				a[i] = j;
				break;
			}
		}
		for (int i = 0; i < n; i++) {
			System.out.print((char) (a[i] + 'a'));
		}
		out.close();
	}

	private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			long sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuffer res = new StringBuffer();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}
	}

	private static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(outputStream);
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1 && arr[0]!=e) {
			System.out.println((char)(arr[0]+1));
			return;
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				i--;
				arr[0]=(char)(int)(arr[0]+1);
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
		if(n==2 && i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		else {
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}
		}
		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				i--;
				arr[0]=(char)(int)(arr[0]+1);
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}
		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
		int i = n-1;
		if(n==1) {
			if(arr[0]!=e)
			System.out.println((char)(arr[0]+1));
			else
				System.out.println("NO");
			return;
		}
		while(i>=2) {
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if(i==1) {
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				arr[0]=(char)(int)(arr[0]+1);
				arr[1]='a';
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+3)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i+1]!=(char)(j+'a') && arr[i+2]!=(char)(j+'a')) {
					arr[i+3]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+4;
		while(j<arr.length) {
			arr[j]=arr[j-3];
			j++;
		}

		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1) {
			if(arr[0]!=e)
			System.out.println((char)(arr[0]+1));
			else
				System.out.println("NO");
			return;
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
//		System.out.println(i);
		if(i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				arr[0]=(char)(int)(arr[0]+1);
				arr[1]='a';
//				i++;
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
//		System.out.println(i);
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
			j++;
		}

		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


// import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				i--;
				arr[0]=(char)(int)(arr[0]+1);
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}
		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1) {
			if(arr[0]!=e)
			System.out.println((char)(arr[0]+1));
			else
				System.out.println("NO");
			return;
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				i--;
				arr[0]=(char)(int)(arr[0]+1);
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
		if(n==2 && i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		else {
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}
		}
		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1) {
			if(arr[0]!=e)
			System.out.println((char)(arr[0]+1));
			else
				System.out.println("NO");
			return;
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
//		System.out.println(i);
		if(i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				arr[0]=(char)(int)(arr[0]+1);
				arr[1]='a';
//				i++;
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
//		System.out.println(i);
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+3)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i+1]!=(char)(j+'a') && arr[i+2]!=(char)(j+'a')) {
					arr[i+3]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+4;
		while(j<arr.length) {
			arr[j]=arr[j-3];
			j++;
		}

		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1) {
			if(arr[0]!=e)
			System.out.println((char)(arr[0]+1));
			else
				System.out.println("NO");
			return;
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				arr[0]=(char)(int)(arr[0]+1);
				arr[1]='a';
//				i++;
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
//		System.out.println(i);
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length && i!=1) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}

		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class SpecialString {
	static void next(String str, char e) {
		//check for end - intially
		System.out.println(str);
		String nxt = "";

			int i = str.length()-1;
			while(str.charAt(i)==e && i>=0)
				i--;
			if(i==-1) {
				System.out.println("NO");
				return;
			}
//				end=true;
			else {
				nxt = str.substring(0,i)+(char)(int)(str.charAt(i)+1)+str.substring(i+1);
				if(str.charAt(i-1)!=nxt.charAt(i) && str.charAt(i-2)!=nxt.charAt(i)) {
					System.out.println("ans: "+nxt);
					return;
				}else {
					next(nxt,e);
				}
			}

		}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		int p = s.nextInt();
		String str = s.nextLine();
		char[] arr = str.toCharArray();
		boolean ans = false;
		char e= (char)(p-1+'a');
//		System.out.println(e);
		int i = n-1;
		if(n==1 && arr[0]!=e) {
			System.out.println((char)(arr[0]));
		}
		while(i>=2) {
//			System.out.println("Enter while");
			while(arr[i]<e) {
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				if(arr[i-1]!=arr[i] && arr[i-2]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(ans)
				break;
			i--;
		}
		if(i==1) {
			while(arr[i]<e) {
//				System.out.println("arr"+"["+i+"]: "+arr[i]);
				arr[i]=(char)(int)(arr[i]+1);
//				System.out.println("arr"+"["+i+"]: "+arr[i]);

				if(arr[i-1]!=arr[i]) {
					ans = true;
					break;
				}
			}
			if(!ans && arr[0]!=e) {
				i--;
				arr[0]=(char)(int)(arr[0]+1);
			}else if(!ans && arr[0]==e) {
				System.out.println("NO");
				return;
			}

		}
//		System.out.println(arr[i]);
		if(n==2 && i==0) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		else {
		if((i+1)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i-1]!=(char)(j+'a') && arr[i]!=(char)(j+'a')) {
					arr[i+1]=(char)(j+'a');
					break;
				}
			}
		}
		if((i+2)<arr.length) {
			for(int j=0;j<=e-'a';j++) {
				if(arr[i]!=(char)(j+'a') && arr[i+1]!=(char)(j+'a')) {
					arr[i+2]=(char)(j+'a');
					break;
				}
			}
		}
		int j = i+3;
		while(j<arr.length) {
			arr[j]=arr[j-3];
		}
		}
		for(char c:arr)
			System.out.print(c);
		 System.out.println();
	}
	static class FastReader

    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        No_palindrome solver = new No_palindrome();
        solver.solve(1, in, out);
        out.close();
    }

    static class No_palindrome {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int p = in.nextInt();
            String str = in.next();
            char[] s = str.toCharArray();
            for (int i = n - 1; i >= 0; i--) {
                char c = str.charAt(i);

                if (ok(c, p, s, i)) {

                    for (int j = i + 1; j < n; j++) {
                        char ch = 'a';
                        ch--;
                        ok(ch, p, s, j);
                    }

                    out.println(new String(s));
                    return;
                }
            }

            out.println("NO");
        }

        private boolean ok(char c, int p, char s[], int idx) {
            c++;
            for (char ch = c; ch <= 'a' + p - 1; ch++) {
                if ((idx == 0 || ch != s[idx - 1]) && (idx <= 1 || ch != s[idx - 2])) {
                    s[idx] = ch;
                    return true;
                }
            }

            return false;

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return nextString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.TreeMap;
import java.util.TreeSet;

public class No464A {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	int mod = (int)(Math.pow(10,9)+7);

	long gcd(long a, long b)
	{
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}
	int d = 0;
	void solve()
	{
		int n = ni();
		int p = ni();
		char ch[] = ns().toCharArray();

		for(int j = n-1 ; j>=0 ; j--) {
			char c = (char)(ch[j]+1);
			boolean flag = false;
			while((c-'a') < p) {
				// sout.println(j + " "+c);
				if(((j>0 && c != ch[j-1]) || j == 0) && ((j>1 && c != ch[j-2]) || (j <=1)) ) {
					flag = true;
					ch[j] = c;

					int k = 0;
					for(int i = j+1 ; i<n ; i++) {

						if(i == 1) {
							while('a'+k == ch[i-1]) {
								k++;
								k = k%p;
							}
						}
						else if(i>1){
							while('a'+k == ch[i-1] || 'a'+k == ch[i-2]) {
								k++;
								k = k%p;
							}
						}

						k = k%p;
						ch[i] = (char)('a'+ k);
					}
					break;
				}
				c++;
			}
			if(flag) {
				out.println(new String(ch));
				return;
			}
		}

		out.println("NO");
	}

	void run() throws Exception
	{
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception { new No464A().run(); }

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int[][] na(int n , int m)
	{
		int[][] a = new int[n][m];
		for(int i = 0;i < n;i++)
			for(int j = 0 ; j<m ; j++) a[i][j] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	void display2D(int a[][]) {
		for(int i[] : a) {
			for(int j : i) {
				out.print(j+" ");
			}
			out.println();
		}
	}

	int[][] creategraph(int n , int m) {
		int g[][] = new int[n+1][];

		int from[] = new int[m];
		int to[] = new int[m];
		int ct[] = new int[n+1];

		for(int i = 0 ; i<m; i++) {
			from[i] = ni();
			to[i] = ni();
			ct[from[i]]++;
			ct[to[i]]++;
		}

		int parent[] = new int[n+1];

		for(int i = 0 ; i<n+1 ; i++) g[i] = new int[ct[i]];

		for(int i = 0 ; i<m ; i++) {
			g[from[i]][--ct[from[i]]] = to[i];
			g[to[i]][--ct[to[i]]] = from[i];
		}

		return g;
	}

	private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); }
}


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.TreeMap;
import java.util.TreeSet;

public class No464A {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	int mod = (int)(Math.pow(10,9)+7);

	long gcd(long a, long b)
	{
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}
	int d = 0;
	void solve()
	{
		int n = ni();
		int p = ni();
		char ch[] = ns().toCharArray();

		for(int j = n-1 ; j>=0 ; j--) {
			char c = (char)(ch[j]+1);
			boolean flag = false;
			while((c-'a') < p) {
				if(((j>0 && c != ch[j-1]) || j == 0) && ((j>1 && c != ch[j-2]) || (j == 1)) ) {
					flag = true;
					ch[j] = c;
					for(int i = j+1 , k = 0 ; i<n ; i++ , k++) {
						k = k%p;
						ch[i] = (char)('a'+ k);
					}
					break;
				}
				c++;
			}
			if(flag) {
				out.println(new String(ch));
				return;
			}
		}

		out.println("NO");
	}

	void run() throws Exception
	{
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception { new No464A().run(); }

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int[][] na(int n , int m)
	{
		int[][] a = new int[n][m];
		for(int i = 0;i < n;i++)
			for(int j = 0 ; j<m ; j++) a[i][j] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	void display2D(int a[][]) {
		for(int i[] : a) {
			for(int j : i) {
				out.print(j+" ");
			}
			out.println();
		}
	}

	int[][] creategraph(int n , int m) {
		int g[][] = new int[n+1][];

		int from[] = new int[m];
		int to[] = new int[m];
		int ct[] = new int[n+1];

		for(int i = 0 ; i<m; i++) {
			from[i] = ni();
			to[i] = ni();
			ct[from[i]]++;
			ct[to[i]]++;
		}

		int parent[] = new int[n+1];

		for(int i = 0 ; i<n+1 ; i++) g[i] = new int[ct[i]];

		for(int i = 0 ; i<m ; i++) {
			g[from[i]][--ct[from[i]]] = to[i];
			g[to[i]][--ct[to[i]]] = from[i];
		}

		return g;
	}

	private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); }
}