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;

					for(int i = j+1 ; i<n ; i++) {
						int k = 0;
						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;
							}
						}

						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) {
				// 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;

					if(j == 0) {
						while('a'+k == ch[j]) k++;
					}
					else {
						while('a'+k == ch[j] || 'a'+k == ch[j-1]) k++;
					}

					for(int i = j+1 ; 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)); }
}


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);
        ProblemANoToPalindromes solver = new ProblemANoToPalindromes();
        solver.solve(1, in, out);
        out.close();
    }

    static class ProblemANoToPalindromes {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.readInt();
            int p = in.readInt();
            char[] s = in.readLine().toCharArray();

            for (int i = n - 1; i >= 0; i--) {
                char[] t = s.clone();
                for (int j = 1; j < p; j++) {
                    t[i] = (char) (s[i] + j);
                    if (t[i] >= 'a' + p) continue;

                    for (int k = i + 1; k < n; k++) {
                        for (t[k] = 'a'; t[k] < 'a' + p && ((k > 0 && t[k] == t[k - 1]) || (k > 1 && t[k] == t[k - 2])); t[k]++)
                            ;
                    }
                    boolean valid = true;
                    for (int k = 1; k < n; k++) {
                        if (t[k] == t[k - 1] || (k > 1 && t[k] == t[k - 2])) {
                            valid = false;
                            break;
                        }
                    }
                    if (valid) {
                        out.println(new String(t));
                        return;
                    }
                }
            }
            out.println("NO");
        }

    }

    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 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 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;
        }

        private String readLine0() {
            StringBuilder buf = new StringBuilder();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public String readLine() {
            String s = readLine0();
            while (s.trim().length() == 0)
                s = readLine0();
            return s;
        }

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

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.File;
import java.io.InputStream;

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

    static class ProblemANoToPalindromes {
        int n;
        int p;
        int[] a;
        Boolean[][][][] memo;
        PrintWriter out;

        boolean dp(int ind, int prev2, int prev, boolean bounded) {
            if (ind == n) return !bounded;
            if (memo[bounded ? 1 : 0][prev2][prev][ind] != null) return memo[bounded ? 1 : 0][prev2][prev][ind];
            int start = bounded ? a[ind] : 1;
            for (int i = start; i <= p; ++i) {
                if (i == prev2 || i == prev) continue;
                if (dp(ind + 1, prev, i, bounded && i == start)) return memo[bounded ? 1 : 0][prev2][prev][ind] = true;
            }
            return memo[bounded ? 1 : 0][prev2][prev][ind] = false;
        }

        void bt(int ind, int prev2, int prev, boolean bounded) {
            if (ind == n) {
                out.println();
                return;
            }
            int start = bounded ? a[ind] : 1;
            for (int i = start; i <= p; ++i) {
                if (i == prev2 || i == prev) continue;
                if (dp(ind + 1, prev, i, bounded && i == start)) {
                    out.print((char) (i + 'a' - 1));
                    bt(ind + 1, prev, i, bounded && i == start);
                    return;
                }
            }
        }

        public void solve(int testNumber, JoltyScanner in, PrintWriter out) {
            this.out = out;
            n = in.nextInt();
            p = in.nextInt();
            a = new int[n];
            memo = new Boolean[2][27][27][n];
            char[] s = in.next().toCharArray();
            for (int i = 0; i < n; ++i) a[i] = s[i] - 'a' + 1;
            if (!dp(0, 0, 0, true)) {
                out.println("NO");
                return;
            }
            bt(0, 0, 0, true);
        }

    }

    static class JoltyScanner {
        public int BS = 1 << 16;
        public char NC = (char) 0;
        public byte[] buf = new byte[BS];
        public int bId = 0;
        public int size = 0;
        public char c = NC;
        public double num = 1;
        public BufferedInputStream in;

        public JoltyScanner(InputStream is) {
            in = new BufferedInputStream(is, BS);
        }

        public JoltyScanner(String s) throws FileNotFoundException {
            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
        }

        public char nextChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }

        public int nextInt() {
            return (int) nextLong();
        }

        public long nextLong() {
            num = 1;
            boolean neg = false;
            if (c == NC) c = nextChar();
            for (; (c < '0' || c > '9'); c = nextChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = nextChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                num *= 10;
            }
            return neg ? -res : res;
        }

        public String next() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = nextChar();
            while (c > 32) {
                res.append(c);
                c = nextChar();
            }
            return res.toString();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.File;
import java.io.InputStream;

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

    static class ProblemANoToPalindromes {
        int n;
        int p;
        int[] a;
        Boolean[][][][] memo;
        PrintWriter out;

        boolean dp(int ind, int prev2, int prev, boolean bounded) {
            if (ind == n) return !bounded;
            if (memo[bounded ? 1 : 0][prev2][prev][ind] != null) return memo[bounded ? 1 : 0][prev2][prev][ind];
            int start = bounded ? a[ind] : 1;
            for (int i = start; i <= p; ++i) {
                if (i == prev2 || i == prev) continue;
                if (dp(ind + 1, prev, i, bounded && i == start)) return memo[bounded ? 1 : 0][prev2][prev][ind] = true;
            }
            return memo[bounded ? 1 : 0][prev2][prev][ind] = false;
        }

        void bt(int ind, int prev2, int prev, boolean bounded) {
            if (ind == n) return;
            int start = bounded ? a[ind] : 1;
            for (int i = start; i <= p; ++i) {
                if (i == prev2 || i == prev) continue;
                if (dp(ind + 1, prev, i, bounded && i == start)) {
                    out.print((char) (i + 'a' - 1));
                    bt(ind + 1, prev, i, bounded && i == start);
                    return;
                }
            }
        }

        public void solve(int testNumber, JoltyScanner in, PrintWriter out) {
            this.out = out;
            n = in.nextInt();
            p = in.nextInt();
            a = new int[n];
            memo = new Boolean[2][27][27][n];
            for (int i = 0; i < n; ++i) a[i] = in.nextChar() - 'a' + 1;
            if (!dp(0, 0, 0, true)) {
                out.println("NO");
                return;
            }
            bt(0, 0, 0, true);
        }

    }

    static class JoltyScanner {
        public int BS = 1 << 16;
        public char NC = (char) 0;
        public byte[] buf = new byte[BS];
        public int bId = 0;
        public int size = 0;
        public char c = NC;
        public double num = 1;
        public BufferedInputStream in;

        public JoltyScanner(InputStream is) {
            in = new BufferedInputStream(is, BS);
        }

        public JoltyScanner(String s) throws FileNotFoundException {
            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
        }

        public char nextChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }

        public int nextInt() {
            return (int) nextLong();
        }

        public long nextLong() {
            num = 1;
            boolean neg = false;
            if (c == NC) c = nextChar();
            for (; (c < '0' || c > '9'); c = nextChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = nextChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                num *= 10;
            }
            return neg ? -res : res;
        }

    }
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Code {
    public static void main(String[] args) {
        // Use the Scanner class
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = sc.nextInt();
        int p = sc.nextInt();
        char[] S = sc.nextLine().toCharArray();

        int i = n -1;
        while (i != -1) {
            char cur = S[i];
            Character prev = i-1 >=0 ? S[i-1] : null;
            Character prev_prev = i-2 >=0 ? S[i-2] : null;
            Character  candidate = get_next(cur, prev, prev_prev, p);
            if (candidate == null) {
                i--;
            } else {
                S[i] = candidate;
                break;
            }
        }
        if (i == -1) {
            System.out.println("NO");
            return;
        }
        i++;
        while (i != n) {
            Character prev = i-1 >=0 ? S[i-1] : null;
            Character prev_prev = i-2 >=0 ? S[i-2] : null;
            Character candidate = get_first(prev, prev_prev, p);
            if (candidate == null) {
                System.out.println("NO");
                return;
            } else {
                S[i++] = candidate;
            }
        }

        System.out.println(new String(S));
    }

    static Character get_next(char c, Character  prev, Character prev_prev, int p) {
        Character res = (char)(c + 1);
        while (res == prev || res == prev_prev) {
            res++;
        }
        if (res > 'a' + p - 1) {
            return null;
        } else {
            return res;
        }
    }

    static Character get_first(Character prev, Character prev_prev, int p) {
        Character c = 'a';
        while (c == prev || c == prev_prev) {
            c++;
        }
        if (c  > 'a' + p - 1) {
            return null;
        } else {
            return c;
        }
    }

    static Sequence find_sequence(SortedSet<Sequence> bst, int idx, boolean type) {
        Sequence target = new Sequence();
        target.last_idx = idx;
        SortedSet<Sequence> hs = bst.headSet(target);
        Sequence ans = hs.isEmpty() ? null : hs.last();
        //System.out.println(String.format("For idx %d found sequence %s", idx, ans));
        return ans;
    }

    static class Sequence implements Comparable<Sequence> {
        List<Integer> idx;
        int last_idx;

        public Sequence() {
            idx = new ArrayList<>();
            last_idx = 0;
        }

        @Override
        public int compareTo(Sequence o) {
            return Integer.compare(this.last_idx, o.last_idx);
        }

        @Override
        public String toString() {
            String res = idx.size() + " " + idx.toString();
            return res;
        }
    }

    static class Event implements Comparable<Event> {
        int time;
        int type; // start is zero, end is 1

        public Event(int time, int type) {
            this.time = time;
            this.type = type;
        }

        @Override
        public int compareTo(Event o) {
            if (o.time != this.time) {
                return Integer.compare(this.time, o.time);
            }
            return Integer.compare(type, o.type);
        }

    }

    static int minimize_schedule(Day[] days, int n, int m, int k) {
        PriorityQueue<Day> q = new PriorityQueue<Day>(Collections.reverseOrder());
        for (int i = 0; i < n ; ++i) {
            q.add(days[i]);
        }

        int total_hours = Arrays.stream(days).mapToInt(d-> new Integer(d.initial_hours)).sum();
        int hours_saved = 0;
        while (k-- > 0) {
            Day cur = q.poll();
            hours_saved += cur.hours_saved;
            cur.update_day();
            q.add(cur);
        }

        return total_hours - hours_saved;
    }

    static class Day implements Comparable<Day> {
        int day_idx;
        String schedule;
        int hours_saved;
        int initial_hours;

        int start_idx;
        int end_idx;

        public Day(int day_idx, String schedule) {
            this.day_idx = day_idx;
            this.schedule = schedule;

            this.hours_saved = 0;

            this.init_day();
        }

        public void init_day() {
            start_idx = schedule.indexOf('1');
            end_idx = schedule.lastIndexOf('1');

            if (start_idx == -1) {
                initial_hours = 0;
            } else {
                initial_hours = end_idx - start_idx + 1;
            }
            hours_saved = max_saveable_hours();

        }

        public int max_saveable_hours() {
            if (end_idx < start_idx) {
                return 0;
            }
            if (end_idx == start_idx) {
                return 1;
            }
            int s_next = schedule.indexOf('1', 1 + start_idx);
            int e_next = schedule.lastIndexOf('1', end_idx - 1 );
            return Math.max(s_next -start_idx, end_idx - e_next);
        }

        public void update_day() {
            if (start_idx > end_idx) {
                return;
            }

            if (start_idx == end_idx) {
                start_idx++;
                end_idx--;

                hours_saved = max_saveable_hours();
                return;
            }

            int s_next = schedule.indexOf('1', 1 + start_idx);
            int e_next = schedule.lastIndexOf('1', end_idx - 1 );

            if (s_next - start_idx > end_idx - e_next) {
                start_idx = s_next;
            } else {
                end_idx = e_next;
            }
            hours_saved = max_saveable_hours();
        }

        @Override
        public int compareTo(Day o) {
            return Integer.compare(this.hours_saved, o.hours_saved);
        }
    }

    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
       BufferedReader br;
       StringTokenizer st;

       public MyScanner() {
          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.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int p = sc.nextInt();
		String s = sc.next();
		String next;

		if(p == 1)
		{
			System.out.println("NO");
		}
		else if(p == 2)
		{
			if(s.equals("a"))
				System.out.println("b");
			else if(s.equals("b"))
				System.out.println("NO");
			if(s.equals("ab"))
				System.out.println("ba");
			else if(s.equals("ba"))
				System.out.println("NO");
		}
		else
		{
			//We try incrementing the last character, then the second-to-last character, etc.
			//If we cannot increment the first character, we know there is no solution.
			boolean found = false;
			for(int i = s.length() - 1; i >= 0 && !found; i--)
			{
				//System.out.println("Next index: " + Integer.toString(i));
				char c = s.charAt(i);
				while( (int) c - (int) 'a' < p - 1 && !found)
				{
					c = nextLetter(c);
					//System.out.println(c + ", " + Integer.toString((int) c - (int) 'a'));
					if(i == 0 || (i == 1 && c != s.charAt(i - 1)) ||
							(i >= 2 && c != s.charAt(i - 1) && c != s.charAt(i - 2)))
					{
						next = fill(s, i, c);
						if(next.length() > 0)
						{
							System.out.println(next);
							found = true;
						}
					}
				}
			}

			if(!found)
				System.out.println("NO");
		}
	}

	public static char nextLetter(char c)
	{
		int val = (int) c;
		return (char) (val + 1);
	}

	public static String fill(String s, int index, char c)
	{
		//System.out.println("Filling string: " + s);
		StringBuilder next;
		if(index > 0)
			next = new StringBuilder(s.substring(0, index));
		else
			next = new StringBuilder("");
		next.append(c);

		//System.out.println(next);
		for(int i = index + 1; i < s.length(); i++)
		{
			//System.out.println(i);
			//System.out.println(next.charAt(i - 2) + ", " + next.charAt(i - 1));
			//If neither of the previous two characters is an a, we use that next.
			if((i == 1 || next.charAt(i - 2) != 'a') && next.charAt(i - 1) != 'a')
				next.append('a');
			//Otherwise, if neither of the previous two characters is a b, we use that next.
			else if((i == 1 || next.charAt(i - 2) != 'b') && next.charAt(i - 1) != 'b')
				next.append('b');
			//Otherwise, the previous two characters are a and b, so we add a c.
			else
				next.append('c');
		}

		return next.toString();
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int p = sc.nextInt();
		String s = sc.next();
		String next;

		if(p == 1)
			System.out.println("NO");
		else if(p == 2)
		{
			if(s.equals("ab"))
				System.out.println("ba");
			else if(s.equals("ba"))
				System.out.println("NO");
		}
		else
		{
			//We try incrementing the last character, then the second-to-last character, etc.
			//If we cannot increment the first character, we know there is no solution.
			boolean found = false;
			for(int i = s.length() - 1; i >= 0 && !found; i--)
			{
				//System.out.println("Next index: " + Integer.toString(i));
				char c = s.charAt(i);
				while( (int) c - (int) 'a' < p - 1 && !found)
				{
					c = nextLetter(c);
					//System.out.println(c + ", " + Integer.toString((int) c - (int) 'a'));
					if(i == 0 || (i == 1 && c != s.charAt(i - 1)) ||
							(i >= 2 && c != s.charAt(i - 1) && c != s.charAt(i - 2)))
					{
						next = fill(s, i, c);
						if(next.length() > 0)
						{
							System.out.println(next);
							found = true;
						}
					}
				}
			}

			if(!found)
				System.out.println("NO");
		}
	}

	public static char nextLetter(char c)
	{
		int val = (int) c;
		return (char) (val + 1);
	}

	public static String fill(String s, int index, char c)
	{
		//System.out.println("Filling string: " + s);
		StringBuilder next;
		if(index > 0)
			next = new StringBuilder(s.substring(0, index));
		else
			next = new StringBuilder("");
		next.append(c);

		//System.out.println(next);
		for(int i = index + 1; i < s.length(); i++)
		{
			//System.out.println(i);
			//System.out.println(next.charAt(i - 2) + ", " + next.charAt(i - 1));
			//If neither of the previous two characters is an a, we fill that in next.
			if((i == 1 || next.charAt(i - 2) != 'a') && next.charAt(i - 1) != 'a')
				next.append('a');
			else if((i == 1 || next.charAt(i - 2) != 'b') && next.charAt(i - 1) != 'b')
				next.append('b');
			else
				next.append('c');
		}

		return next.toString();
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int p = sc.nextInt();
		String s = sc.next();
		String next;

		if(p == 1)
			System.out.println("NO");
		else if(p == 2)
		{
			if(s.equals("ab"))
				System.out.println("ba");
			else if(s.equals("ba"))
				System.out.println("NO");
		}
		else
		{
			//We try incrementing the last character, then the second-to-last character, etc.
			//If we cannot increment the first character, we know there is no solution.
			boolean found = false;
			for(int i = s.length() - 1; i >= 0 && !found; i--)
			{
				System.out.println("Next index: " + Integer.toString(i));
				char c = s.charAt(i);
				while( (int) c - (int) 'a' < p - 1 && !found)
				{
					c = nextLetter(c);
					System.out.println(c + ", " + Integer.toString((int) c - (int) 'a'));
					if(i == 0 || (i == 1 && c != s.charAt(i - 1)) ||
							(i >= 2 && c != s.charAt(i - 1) && c != s.charAt(i - 2)))
					{
						next = fill(s, i, c);
						if(next.length() > 0)
						{
							System.out.println(next);
							found = true;
						}
					}
				}
			}

			if(!found)
				System.out.println("NO");
		}
	}

	public static char nextLetter(char c)
	{
		int val = (int) c;
		return (char) (val + 1);
	}

	public static String fill(String s, int index, char c)
	{
		//System.out.println("Filling string: " + s);
		StringBuilder next;
		if(index > 0)
			next = new StringBuilder(s.substring(0, index));
		else
			next = new StringBuilder("");
		next.append(c);

		System.out.println(next);
		for(int i = index + 1; i < s.length(); i++)
		{
			//System.out.println(i);
			//System.out.println(next.charAt(i - 2) + ", " + next.charAt(i - 1));
			//If neither of the previous two characters is an a, we fill that in next.
			if((i == 1 || next.charAt(i - 2) != 'a') && next.charAt(i - 1) != 'a')
				next.append('a');
			else if((i == 1 || next.charAt(i - 2) != 'b') && next.charAt(i - 1) != 'b')
				next.append('b');
			else
				next.append('c');
		}

		return next.toString();
	}
}


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

import static java.lang.Math.*;

public class Main extends PrintWriter {
    BufferedReader in;
    StringTokenizer stok;
    final Random rand = new Random(31);
    final int inf = (int) 1e9;
    final long linf = (long) 1e18;

    final static String IO = "_std";

    void solve() throws IOException {
        int n = nextInt();
        int p = nextInt();
        char[] s = next().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) {
            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++) {
            print((char) (a[i] + 'a'));
        }
    }

    Main() {
        super(System.out);
        in = new BufferedReader(new InputStreamReader(System.in));
    }

    Main(String fileIn, String fileOut) throws IOException {
        super(fileOut);
        in = new BufferedReader(new FileReader(fileIn));
    }

    public static void main(String[] args) throws IOException {
        Main main;
        if ("_std".equals(IO)) {
            main = new Main();
        } else if ("_iodef".equals(IO)) {
            main = new Main("input.txt", "output.txt");
        } else {
            main = new Main(IO + ".in", IO + ".out");
        }
        main.solve();
        main.close();
    }

    String next() throws IOException {
        while (stok == null || !stok.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null) {
                return null;
            }
            stok = new StringTokenizer(s);
        }
        return stok.nextToken();
    }

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

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

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

    int[] nextIntArray(int len) throws IOException {
        int[] a = new int[len];
        for (int i = 0; i < len; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    int[] nextIntArraySorted(int len) throws IOException {
        int[] a = nextIntArray(len);
        shuffle(a);
        Arrays.sort(a);
        return a;
    }

    void shuffle(int[] a) {
        for (int i = 1; i < a.length; i++) {
            int x = rand.nextInt(i + 1);
            int _ = a[i];
            a[i] = a[x];
            a[x] = _;
        }
    }

    void shuffleAndSort(int[] a) {
        shuffle(a);
        Arrays.sort(a);
    }

    boolean nextPermutation(int[] p) {
        for (int a = p.length - 2; a >= 0; --a) {
            if (p[a] < p[a + 1])
                for (int b = p.length - 1; ; --b)
                    if (p[b] > p[a]) {
                        int t = p[a];
                        p[a] = p[b];
                        p[b] = t;
                        for (++a, b = p.length - 1; a < b; ++a, --b) {
                            t = p[a];
                            p[a] = p[b];
                            p[b] = t;
                        }
                        return true;
                    }
        }
        return false;
    }

    <T> List<T>[] createAdjacencyList(int n) {
        List<T>[] res = new List[n];
        for (int i = 0; i < n; i++) {
            res[i] = new ArrayList<>();
        }
        return res;
    }
}


import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

public class code
{
	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;
        }
    }

    public static void main(String args[])throws IOException
	{
        FastReader scn = new FastReader();

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

        String input = scn.nextLine();
        char max_char = (char)('a' + p - 1);
        if(p==1)
        {
            System.out.println("NO");
            return;
        }

        if(p==2)
        {
            char left = input.charAt(0);
            char right = input.charAt(1);

            if(left < right)
            {
                System.out.println(right+""+left);
            }
            else
            {
                System.out.println("NO");
            }
            return;
        }

        int i;
        char j ='x';
        boolean set = false;
        outer:
        for(i = n - 1; i >= 0; i--)
        {
            char left = '0';
            char left_left = '0';

            if( i > 0)
                left = input.charAt(i-1);
            if( i > 1)
                left_left = input.charAt(i-2);

            char current = input.charAt(i);
            for(j = (char)(current + 1); j <= max_char; j++)
            {
                if(j!=left && j!=left_left)
                {
                    set = true;
                    break outer;
                }
            }
        }

        if(!set)
        {
            System.out.println("NO");
        }
        else
        {
            StringBuilder result = new StringBuilder();
            for(int k = 0; k < i; k++)
            {
                result.append(input.charAt(k));
            }
            result.append(j);
            int length = i + 1;
            while(length < n)
            {
                char left = '0';
                char left_left = '0';

                if( length > 0)
                    left = result.charAt(length - 1);
                if( length > 1)
                    left_left = result.charAt(length - 2);

                for(char addition = 'a'; addition <= max_char; addition++)
                {
                    if(addition!=left && addition!=left_left)
                    {
                        length++;
                        result.append(addition);
                        break;
                    }
                }
            }

            System.out.println(result.toString());
        }

	}

    public static int getIndex(int[] list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list[middle]==value)
                return middle;
            else if(list[middle] < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return -1;
    }

    public static int getLessThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return r;
    }

    public static int getMoreThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return l;
    }

    public static long inverseModulo(long a, long P)
    {
        return powerModulo(a, P-2, P);
    }

    public static long powerModulo(long a, long p, long m)
    {
        if(p==0)
            return 1;

        long temp = powerModulo(a, p/2, m);
        temp = (temp * temp)%m;
        if(p%2 == 0)
            return temp;
        else
            return (a * temp)%m;

    }
}

class Pair implements Comparable<Pair>
{
    int a, b;

    public Pair(int a, int b)
    {
        this.a = a;
        this.b = b;
    }

    public int compareTo(Pair p)
    {
        return this.b - p.b;
    }
}

class Node
{
    int value;
    int req_value;
    ArrayList<Integer> neighbors;
    boolean visited;

    public Node()
    {
        neighbors = new ArrayList<>();
    }

}

class MutableInt
{
    int count;
    ArrayList<Integer> list;
    public MutableInt()
    {
        list = new ArrayList<>();
    }
}


import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

public class code
{
	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;
        }
    }

    public static void main(String args[])throws IOException
	{
        FastReader scn = new FastReader();

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

        String input = scn.nextLine();
        char max_char = (char)('a' + p - 1);
        if(p==1)
        {
            System.out.println("NO");
            return;
        }

        if(p==2)
        {
            char left = input.charAt(0);
            char right = input.charAt(1);

            if(left < right)
            {
                System.out.println(right+""+left);
            }
            else
            {
                System.out.println("NO");
            }
            return;
        }

        int i;
        char j ='x';
        boolean set = false;
        outer:
        for(i = n - 1; i >= 0; i--)
        {
            char left = '0';
            char left_left = '0';

            if( i > 0)
                left = input.charAt(i-1);
            if( i > 1)
                left_left = input.charAt(i-2);

            char current = input.charAt(i);
            for(j = (char)(current + 1); j <= max_char; j++)
            {
                if(j!=left && j!=left_left)
                {
                    set = true;
                    break outer;
                }
            }
        }

        if(!set)
        {
            System.out.println("NO");
        }
        else
        {
            StringBuilder result = new StringBuilder();
            for(int k = 0; k < i; k++)
            {
                result.append(input.charAt(k));
            }
            result.append(j);
            int length = i + 1;
            while(length < n)
            {
                char left = '0';
                char left_left = '0';

                if( length > 0)
                    left = input.charAt(length - 1);
                if( length > 1)
                    left_left = input.charAt(length - 2);

                for(char addition = 'a'; addition <= max_char; addition++)
                {
                    if(addition!=left && addition!=left_left)
                    {
                        length++;
                        result.append(addition);
                        break;
                    }
                }
            }

            System.out.println(result.toString());
        }

	}

    public static int getIndex(int[] list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list[middle]==value)
                return middle;
            else if(list[middle] < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return -1;
    }

    public static int getLessThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return r;
    }

    public static int getMoreThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return l;
    }

    public static long inverseModulo(long a, long P)
    {
        return powerModulo(a, P-2, P);
    }

    public static long powerModulo(long a, long p, long m)
    {
        if(p==0)
            return 1;

        long temp = powerModulo(a, p/2, m);
        temp = (temp * temp)%m;
        if(p%2 == 0)
            return temp;
        else
            return (a * temp)%m;

    }
}

class Pair implements Comparable<Pair>
{
    int a, b;

    public Pair(int a, int b)
    {
        this.a = a;
        this.b = b;
    }

    public int compareTo(Pair p)
    {
        return this.b - p.b;
    }
}

class Node
{
    int value;
    int req_value;
    ArrayList<Integer> neighbors;
    boolean visited;

    public Node()
    {
        neighbors = new ArrayList<>();
    }

}

class MutableInt
{
    int count;
    ArrayList<Integer> list;
    public MutableInt()
    {
        list = new ArrayList<>();
    }
}


import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

public class code
{
	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;
        }
    }

    public static void main(String args[])throws IOException
	{
        FastReader scn = new FastReader();

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

        String input = scn.nextLine();
        char max_char = (char)('a' + p - 1);
        if(p==1)
        {
            System.out.println("NO");
            return;
        }

        if(p==2)
        {
            if(n==2)
            {
                char left = input.charAt(0);
                char right = input.charAt(1);

                if(left < right)
                {
                    System.out.println(right+""+left);
                }
                else
                {
                    System.out.println("NO");
                }
            }
            else if(n==1)
            {
                char left = input.charAt(0);
                if(left < max_char)
                {
                    System.out.println((char)(left + 1));
                }
                else
                {
                    System.out.println("NO");
                }
            }
            return;
        }

        int i;
        char j ='x';
        boolean set = false;
        outer:
        for(i = n - 1; i >= 0; i--)
        {
            char left = '0';
            char left_left = '0';

            if( i > 0)
                left = input.charAt(i-1);
            if( i > 1)
                left_left = input.charAt(i-2);

            char current = input.charAt(i);
            for(j = (char)(current + 1); j <= max_char; j++)
            {
                if(j!=left && j!=left_left)
                {
                    set = true;
                    break outer;
                }
            }
        }

        if(!set)
        {
            System.out.println("NO");
        }
        else
        {
            StringBuilder result = new StringBuilder();
            for(int k = 0; k < i; k++)
            {
                result.append(input.charAt(k));
            }
            result.append(j);
            int length = i + 1;
            while(length < n)
            {
                char left = '0';
                char left_left = '0';

                if( length > 0)
                    left = result.charAt(length - 1);
                if( length > 1)
                    left_left = result.charAt(length - 2);

                for(char addition = 'a'; addition <= max_char; addition++)
                {
                    if(addition!=left && addition!=left_left)
                    {
                        length++;
                        result.append(addition);
                        break;
                    }
                }
            }

            System.out.println(result.toString());
        }

	}

    public static int getIndex(int[] list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list[middle]==value)
                return middle;
            else if(list[middle] < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return -1;
    }

    public static int getLessThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return r;
    }

    public static int getMoreThanIndex(ArrayList<Integer> list, int value, int l, int r)
    {
        while( l <= r)
        {
            int middle = (l+r)/2;

            if(list.get(middle)==value)
                return middle;
            else if(list.get(middle) < value)
                l = middle + 1;
            else
                r = middle - 1;
        }
        return l;
    }

    public static long inverseModulo(long a, long P)
    {
        return powerModulo(a, P-2, P);
    }

    public static long powerModulo(long a, long p, long m)
    {
        if(p==0)
            return 1;

        long temp = powerModulo(a, p/2, m);
        temp = (temp * temp)%m;
        if(p%2 == 0)
            return temp;
        else
            return (a * temp)%m;

    }
}

class Pair implements Comparable<Pair>
{
    int a, b;

    public Pair(int a, int b)
    {
        this.a = a;
        this.b = b;
    }

    public int compareTo(Pair p)
    {
        return this.b - p.b;
    }
}

class Node
{
    int value;
    int req_value;
    ArrayList<Integer> neighbors;
    boolean visited;

    public Node()
    {
        neighbors = new ArrayList<>();
    }

}

class MutableInt
{
    int count;
    ArrayList<Integer> list;
    public MutableInt()
    {
        list = new ArrayList<>();
    }
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		modInd=n-1;
		increment(c,p,n-1);
		while(modInd>=0&&bad(c,p))
			increment(c,p,n-1);
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static void rewrite(char[]c,int p,int i){
		increment(c,p,i);
		if(p>=99){
			char[]fill={'a','b','c'};
			for(int j=i+1;j<c.length;j++)
				c[j]=fill[(j-i-1)%3];
		}
	}
	private static boolean bad(char[]c,int p){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2])){
				rewrite(c,p,i);
				return bad(c,p);
			}
		return false;
	}
	private static void increment(char[]c,int p,int ind){
		c[ind]++;
		modInd=Math.min(modInd,ind);
		if(c[ind]==p){
			c[ind--]='a';
			modInd=Math.min(modInd,ind);
			if(ind>=0)
				increment(c,p,ind);
		}
	}
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		modInd=n-1;
		do{
			increment(c,p,n-1);
		}while(modInd>=0&&bad(c,p));
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static void rewrite(char[]c,int p,int i){
		increment(c,p,i);
		if(p>=99){
			char[]fill={'a','b','c'};
			for(int j=i+1;j<c.length;j++)
				c[j]=fill[(j-i-1)%3];
		}
	}
	private static boolean bad(char[]c,int p){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2])){
				rewrite(c,p,i);
				return true;
			}
		return false;
	}
	private static void increment(char[]c,int p,int ind){
		c[ind]++;
		modInd=Math.min(modInd,ind);
		if(c[ind]==p){
			c[ind--]='a';
			modInd=Math.min(modInd,ind);
			if(ind>=0)
				increment(c,p,ind);
		}
	}
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		modInd=n-1;
		do{
			increment(c,p,n-1);
		}while(modInd>=0&&bad(c));
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static boolean bad(char[]c){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2]))
				return true;
		return false;
	}
	private static void increment(char[]c,int p,int ind){
		c[ind]++;
		modInd=Math.min(modInd,ind);
		if(c[ind]==p){
			c[ind--]='a';
			modInd=Math.min(modInd,ind);
			if(ind>=0)
				increment(c,p,ind);
		}
	}
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		modInd=n-1;
		do{
			increment(c,p);
		}while(modInd>=0&&bad(c));
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static boolean bad(char[]c){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2]))
				return true;
		return false;
	}
	private static void increment(char[]c,int p){
		c[modInd]++;
		if(c[modInd]==p){
			c[modInd--]='a';
			if(modInd>=0)
				increment(c,p);
		}
	}
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		do{
			modInd=n-1;
			increment(c,p);
		}while(modInd>=0&&bad(c));
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static boolean bad(char[]c){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2]))
				return true;
		return false;
	}
	private static void increment(char[]c,int p){
		c[modInd]++;
		if(c[modInd]==p){
			c[modInd--]='a';
			if(modInd>=0)
				increment(c,p);
		}
	}
}


import java.util.*;
public class NoToPalindromes {
	private static int modInd;
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),p=sc.nextInt()+97;
		sc.nextLine();
		char[]c=sc.nextLine().toCharArray();
		sc.close();
		do{
			modInd=n-1;
			increment(c,p);
		}while(modInd>=0&&bad(c));
		if(modInd<0)
			System.out.print("NO");
		else
			for(char ch:c)
				System.out.print(ch);
	}
	private static boolean bad(char[]c){
		for(int i=modInd;i<c.length;i++)
			if((i>0&&c[i]==c[i-1])||(i>1&&c[i]==c[i-2]))
				return true;
		return false;
	}
	private static void increment(char[]c,int p){
		c[modInd]++;
		if(c[modInd]==p){
			c[modInd--]='a';
			if(modInd>=0)
				increment(c,p);
		}
		for(char k:c)
			System.out.print(k);
		System.out.println();
	}
}


import java.util.*;

public class Main{

	static int n,p;
	static int a[] = new int[1010];

	static boolean dfs(int dep) {
		if (dep==0) return false;
		for (int i = a[dep]+1;i <= p;i++) {
			if (dep-1>=1 && a[dep-1]==i) continue;
			if (dep-2>=1 && a[dep-2]==i) continue;
			a[dep] = i;
			return true;
		}
		if (!dfs(dep-1)) return false;
		a[dep] = 1;
		for (int i = a[dep];i<=p;i++) {
			if (dep-1>=1 && a[dep-1]==i) continue;
			if (dep-2>=1 && a[dep-2]==i) continue;
			a[dep] = i;
			return true;
		}
		return false;
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s;
		n = in.nextInt();p = in.nextInt();
		s = in.next();
		for (int i = 1;i <= n;i++) {
			a[i] = (int)(s.charAt(i-1)-'a'+1);
		}
		if (dfs(n))
			for (int i = 1;i <= n;i++)
				System.out.print((char)(a[i]+'a'-1));
		else
			System.out.println("NO");
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
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);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int p = in.nextInt();
            char[] s = in.next().toCharArray();
            for (int i = n - 1; i >= 0; i--) {
                char c = inc(s, i, p);
                if (c != '$') {
                    s[i] = c;
                    for (int j = i + 1; j < n; j++) {
                        s[j] = 'a' - 1;
                        char tail = inc(s, j, p);
                        if (tail == '$') {
                            out.println("NO");
                            return;
                        }
                        s[j] = tail;
                    }
                    out.println(s);
                    return;
                }
            }
            out.println("NO");
        }

        static char inc(char[] s, int ind, int p) {
            for (int i = s[ind] - 'a' + 1; i < p; i++) {
                if ((ind < 1 || s[ind - 1] != (i + 'a')) && (ind < 2 || s[ind - 2] != (i + 'a'))) {
                    return (char) ('a' + i);
                }
            }
            return '$';
        }

    }

    static class InputReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

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

    }
}


import java.util.*;
import java.io.*;
public class A {

	static int n, p;
	public static void main(String...strings) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		n = Integer.parseInt(st.nextToken());
		p = Integer.parseInt(st.nextToken());
		char[] in = br.readLine().toCharArray();
		in = next(in);
		if(n == 1){
			if(in == null){
				System.out.println("NO");
			}
			else{
				System.out.println(new String(in));
			}
		}
		else if(p == 2){
			if(n > 2){
				System.out.println("NO");
			}
			else{
				String _in = new String(in);
				if(_in.equals("ba")) System.out.println("ba");
				else if(_in.equals("bb")) System.out.println("NO");
			}
		}
		else{
			while(!tolerable(in)){
				for(int i = 0; i < n-1; i++){
					if(in[i] == in[i+1]){
						in[i+1]++;
						for(int j = i+2; j < n; j++){
							in[j] = (char)((j-i-2)%3 + 'a');
						}
					}
				}
				for(int i = 0; i < n-2; i++){
					if(in[i] == in[i+2]){
						in[i+2]++;
						for(int j = i+3; j < n; j++){
							in[j] = (char)((j-i-2)%3 + 'a');
						}
					}
				}
				int pos;
				while((pos = valid(in)) >= 0){
					if(pos == 0){
						System.out.println("NO"); return;
					}
					else{
						in[p-1]++;
						for(int j = p; j < n; j++){
							in[j] = (char)((j-p)%3 + 'a');
						}
					}
				}
			}
			System.out.println(in);
		}
	}
	static int valid(char[] arr){
		for(int i = 0; i < n; i++){
			if(arr[i]-'a' >= p) return i;
		}
		return -1;
	}
	static boolean tolerable(char[] arr){
		for(int i = 0; i < n-1; i++){
			if(arr[i] == arr[i+1]) return false;
		}
		for(int i = 0; i < n-2; i++){
			if(arr[i] == arr[i+2]) return false;
		}
		return true;
	}
	static char[] next(char[] arr){
		for(int i = n-1; i >= 0; i--){
			if((int)(arr[i]-'a') == p-1) arr[i] = 'a';
			else{
				arr[i]++; return arr;
			}
		}
		return null;
	}
}


import java.util.*;
import java.io.*;
public class A {

	static int n, p;
	public static void main(String...strings) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		n = Integer.parseInt(st.nextToken());
		p = Integer.parseInt(st.nextToken());
		char[] in = br.readLine().toCharArray();
		in = next(in);
		if(n == 1){
			if(in == null){
				System.out.println("NO");
			}
			else{
				System.out.println(new String(in));
			}
		}
		else if(p == 2){
			if(n > 2){
				System.out.println("NO");
			}
			else{
				String _in = new String(in);
				if(_in.equals("ba")) System.out.println("ba");
				else if(_in.equals("bb")) System.out.println("NO");
			}
		}
		else{
			while(!tolerable(in)){
				for(int i = 0; i < n-1; i++){
					if(in[i] == in[i+1]){
						in[i+1]++;
						for(int j = i+2; j < n; j++){
							in[j] = (char)((j-i-2)%3 + 'a');
						}
					}
				}
				for(int i = 0; i < n-2; i++){
					if(in[i] == in[i+2]){
						in[i+2]++;
						for(int j = i+3; j < n; j++){
							in[j] = (char)((j-i-3)%3 + 'a');
						}
					}
				}
				int pos;
				while((pos = valid(in)) >= 0){
					if(pos == 0){
						System.out.println("NO"); return;
					}
					else{
						in[pos-1]++;
						for(int j = pos; j < n; j++){
							in[j] = (char)((j-pos)%3 + 'a');
						}
					}
				}
			}
			System.out.println(in);
		}
	}
	static int valid(char[] arr){
		for(int i = 0; i < n; i++){
			if(arr[i]-'a' >= p) return i;
		}
		return -1;
	}
	static boolean tolerable(char[] arr){
		for(int i = 0; i < n-1; i++){
			if(arr[i] == arr[i+1]) return false;
		}
		for(int i = 0; i < n-2; i++){
			if(arr[i] == arr[i+2]) return false;
		}
		return true;
	}
	static char[] next(char[] arr){
		for(int i = n-1; i >= 0; i--){
			if((int)(arr[i]-'a') == p-1) arr[i] = 'a';
			else{
				arr[i]++; return arr;
			}
		}
		return null;
	}
}


import java.util.*;
import java.io.*;
public class A {

	static int n, p;
	public static void main(String...strings) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		n = Integer.parseInt(st.nextToken());
		p = Integer.parseInt(st.nextToken());
		char[] in = br.readLine().toCharArray();
		in = next(in);
		if(n == 1){
			if(in == null){
				System.out.println("NO");
			}
			else{
				System.out.println(new String(in));
			}
		}
		else if(p == 2){
			if(n > 2){
				System.out.println("NO");
			}
			else{
				String _in = new String(in);
				if(_in.equals("ba")) System.out.println("ba");
				else if(_in.equals("bb")) System.out.println("NO");
			}
		}
		else{
			while(!tolerable(in)){
				for(int i = 0; i < n-1; i++){
					if(in[i] == in[i+1]){
						in[i+1]++;
						for(int j = i+2; j < n; j++){
							in[j] = (char)((j-i-2)%3 + 'a');
						}
					}
				}
				for(int i = 0; i < n-2; i++){
					if(in[i] == in[i+2]){
						in[i+2]++;
						for(int j = i+3; j < n; j++){
							in[j] = (char)((j-i-2)%3 + 'a');
						}
					}
				}
				int pos;
				while((pos = valid(in)) >= 0){
					if(pos == 0){
						System.out.println("NO"); return;
					}
					else{
						in[pos-1]++;
						for(int j = pos; j < n; j++){
							in[j] = (char)((j-pos)%3 + 'a');
						}
					}
				}
			}
			System.out.println(in);
		}
	}
	static int valid(char[] arr){
		for(int i = 0; i < n; i++){
			if(arr[i]-'a' >= p) return i;
		}
		return -1;
	}
	static boolean tolerable(char[] arr){
		for(int i = 0; i < n-1; i++){
			if(arr[i] == arr[i+1]) return false;
		}
		for(int i = 0; i < n-2; i++){
			if(arr[i] == arr[i+2]) return false;
		}
		return true;
	}
	static char[] next(char[] arr){
		for(int i = n-1; i >= 0; i--){
			if((int)(arr[i]-'a') == p-1) arr[i] = 'a';
			else{
				arr[i]++; return arr;
			}
		}
		return null;
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.sql.Array;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;

public class workspace {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		int n = in.readInt();
		int m = in.readInt();

		char[] ch = in.readString().toCharArray();
		boolean check = false;
		int posi = -1;
		for (int i = n - 1; i >= 0; i--) {
			for (int j = (int) (ch[i] - 'a') + 1; j < m; j++) {
				if ((i >= 1 && j == (ch[i - 1]-'a')) || ((i >= 2) && (j == (ch[i - 2]-'a')))) {
					continue;
				} else {
					check = true;
					posi = i;
					ch[i] = (char) (j + (int) 'a');
					break;
				}
			}
			if (check) {
				break;
			}
		}

		if (!check) {
			System.out.println("NO");
			return;
		}

		for (int i = posi + 1; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (i > 0 && (ch[i - 1]-'a') == j || i > 1 && (ch[i - 2]-'a') == j) {
					continue;
				}

				ch[i] = (char) (j + 'a');
				break;
			}
		}

		for (int i = 0; i < ch.length; i++) {
			out.print(ch[i]);
		}

		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.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.sql.Array;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;

public class workspace {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		int n = in.readInt();
		int m = in.readInt();

		char[] ch = in.readString().toCharArray();
		boolean check = false;
		int posi = -1;
		for (int i = n - 1; i >= 0; i--) {
			for (int j = (int) (ch[i] - 'a') + 1; j < m; j++) {
				if ((i >= 1 && j == (ch[i - 1]-'a')) || ((i >= 2) && (j == (ch[i - 2]-'a')))) {
					continue;
				} else {
					check = true;
					posi = i;
					ch[i] = (char) (j + (int) 'a');
					break;
				}
			}
			if (check) {
				break;
			}
		}

		if (!check) {
			System.out.println("NO");
			return;
		}

		for (int i = posi + 1; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (i > 0 && ch[i - 1] == j || i > 1 && ch[i - 2] == j) {
					continue;
				}

				ch[i] = (char) (j + 'a');
				break;
			}
		}

		for (int i = 0; i < ch.length; i++) {
			out.print(ch[i]);
		}

		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.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.sql.Array;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;

public class workspace {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);

		int n = in.readInt();
		int m = in.readInt();

		char[] ch = in.readString().toCharArray();
		boolean check = false;
		int posi = -1;
		for (int i = n - 1; i >= 0; i--) {
			char selectedChar = ch[i];
			for (int j = (int) (ch[i] - 'a') + 1; j < m; j++) {
				if ((i >= 1 && selectedChar == ch[i - 1]) || (i >= 2) && (selectedChar == ch[i - 2])) {
					continue;
				} else {
					check = true;
					posi = i;
					ch[i] = (char) (j + (int) 'a');
					break;
				}
			}
			if (check) {
				break;
			}
		}

		if (!check) {
			System.out.println("NO");
			return;
		}

		for (int i = posi + 1; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (i > 0 && ch[i - 1] == j || i > 1 && ch[i - 2] == j) {
					continue;
				}

				ch[i] = (char) (j + 'a');
				break;
			}
		}

		for (int i = 0; i < ch.length; i++) {
			out.print(ch[i]);
		}

		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.*;
import java.util.*;

public class Main {

	static BufferedReader reader;
	static StringTokenizer tokenizer;
	static PrintWriter writer;

	static int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	static long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	static double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	static String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

	public static void main(String[] args) throws IOException {
		reader = new BufferedReader(new InputStreamReader(System.in));
		writer = new PrintWriter(System.out);
		apple();
		reader.close();
		writer.close();
	}

	static int[] str;
	static int n;
	static int p;

	static boolean next(int t) {
		if (str[t] == p) {
			for (int j = t + 1; j < n; j++) {
				str[j] = 0;
			}
			while (str[t] == p) {
				str[t] = 0;
				t--;
				if (t == -1)
					return false;
			}
			str[t]++;
			return true;
		} else {
			str[t]++;
			return true;
		}
	}

	static int check() {
		for (int i = 0; i < n; i++) {
			if (i > 0) {
				if (str[i] == str[i - 1])
					return i;
			}
			if (i > 1) {
				if (str[i] == str[i - 2])
					return i;
			}
		}
		return -1;
	}

	static void print() {
		for (int i = 0; i < n; i++) {
			writer.print((char) ('a' + str[i]));
		}
		writer.println();
	}

	static void apple() throws NumberFormatException, IOException {
		n = nextInt();
		p = nextInt() - 1;
		String s = nextToken();
		str = new int[n];
		boolean bLast = true;
		for (int i = 0; i < n; i++) {
			str[i] = s.charAt(i) - 'a';
			if (str[i] < p)
				bLast = false;
		}
		if (bLast) {
			writer.println("NO");
			return;
		}
		int t = n - 1;
		while (next(t)) {
			t = check();
			if (t == -1) {
				print();
				return;
			}
		}
		writer.println("NO");
	}
}


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

public class A {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = sc.nextInt(), p = sc.nextInt();
        char[] a = sc.next().toCharArray();
        for (int i = n - 1; i >= 0; i--) {
            char cur = a[i]; cur++;
            while (cur - 'a' < p && (i > 0 && cur == a[i - 1] || i > 1 && cur == a[i - 2])) cur++;
            if (cur - 'a' == p) continue;
            a[i] = cur;
            int j;
            for (j = i + 1; j < n; j++) {
                cur = 'a';
                while (cur - 'a' < p && (j > 0 && cur == a[j - 1] || j > 1 && cur == a[j - 2])) cur++;
                if (cur - 'a' == p) break;
                a[j] = cur;
            }
            if (j == n) {
                for (char c : a) out.print(c);
                out.println();
                out.flush();
                return;
            }
        }
        out.println("NO");
        out.flush();
        out.close();
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
        public Scanner(String file) throws Exception {br = new BufferedReader(new FileReader(file));}
        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public String nextLine()throws IOException{return br.readLine();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public double nextDouble() throws IOException {return Double.parseDouble(next());}
        public char nextChar()throws IOException{return next().charAt(0);}
        public Long nextLong()throws IOException{return Long.parseLong(next());}
        public boolean ready() throws IOException{return br.ready();}
        public void waitForInput() throws InterruptedException {Thread.sleep(3000);}
    }
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Vadim Semenov
 */
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);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int length = in.nextInt();
        int p = in.nextInt();
        char[] input = in.next().toCharArray();
        int last = input[input.length - 1] == 'a' + p - 1 ? input.length - 2 : input.length - 1;
        while (true) {
            if (last < 0) {
                out.println("NO");
                return;
            }
            input[last]++;
            while ((last - 1 >= 0 && input[last - 1] == input[last]) || (last - 2 >= 0 && input[last - 2] == input[last]))
                input[last]++;
            if (input[last] > 'a' + p - 1) last--;
            else break;
        }
        last++;
        while (last < input.length) {
            input[last] = 'a';
            while ((last - 1 >= 0 && input[last - 1] == input[last]) || (last - 2 >= 0 && input[last - 2] == input[last]))
                input[last]++;
            if (input[last] > 'a' + p - 1) {
                out.println("NO");
                return;
            }
            last++;
        }
        out.println(new String(input));
    }
}

class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
    }

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

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(readLine());
        }
        return tokenizer.nextToken();
    }

    public String readLine() {
        String line = null;
        try {
            line = reader.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return line;
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.stream.*;

/**
 * @author Pradyumn
 */

public class Main implements Runnable{

	public static void main(String[] args) {
		new Thread(null, new Main(), ":)", 1 << 26).start();
	}
	@SuppressWarnings("Unchecked")
	public void solve() throws IOException {
		int n = ni();
		int p = ni();
		char[] s = ns(n);
		for(int i = n - 1;i >= 0; --i) {
			for(char c = (char)(s[i] + 1);c < 'a' + p; ++c) {
				s[i] = c;
				if(i - 1 >= 0 && s[i] == s[i - 1] || i - 2 >= 0 && s[i - 2] == s[i]) continue;
				inner:
				for(int j = i + 1;j < n; ++j) {
					for(char d = 'a';d < 'a' + p; ++d) {
						s[j] = d;
						if(j - 1 >= 0 && s[j - 1] == s[j] || j - 2 >= 0 && s[j - 2] == s[j]) continue;
						continue inner;
					}
				}
				out.println(new String(s));
				return;
			}
		}
		out.println("NO");
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in),32768);
			st = null;
			out = new PrintWriter(System.out);
			solve();
			br.close();
			out.close();
		} catch(IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
	public char[] ns(int n) throws IOException {
		return ns().toCharArray();
	}
	public String ns() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}

	public int ni() throws IOException {
		return Integer.parseInt(ns());
	}

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

	public long nl() throws IOException {
		return Long.parseLong(ns());
	}

	public long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for(int i = 0;i < n; ++i) a[i] = nl();
		return a;
	}

	public double nd() throws IOException {
		return Double.parseDouble(ns());
	}
}


import java.util.*;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.stream.*;

/**
 * @author Pradyumn
 */

public class Main implements Runnable{

	public static void main(String[] args) {
		new Thread(null, new Main(), ":)", 1 << 26).start();
	}
	@SuppressWarnings("Unchecked")
	public void solve() throws IOException {
		int n = ni();
		int p = ni();
		char[] s = ns(n);
		for(int i = n - 1;i >= 0; --i) {
			for(char c = (char)(s[i] + 1);c < 'a' + p; ++c) {
				s[i] = c;
				if(i - 1 >= 0 && s[i - 1] == s[i] || i - 2 >= 0 && s[i - 2] == s[i]) continue;
				inner:
				for(int j = i + 1;j < n; ++j) {
					for(char d = 'a';d < 'a' + p; ++d) {
						s[j] = d;
						if(j - 1 >= 0 && s[j - 1] == s[j] || j - 2 >= 0 && s[j - 2] == s[j]) continue;
						continue inner;
					}
				}
				out.println(new String(s));
				return;
			}
		}
		out.println("NO");
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in),32768);
			st = null;
			out = new PrintWriter(System.out);
			solve();
			br.close();
			out.close();
		} catch(IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
	public char[] ns(int n) throws IOException {
		return ns().toCharArray();
	}
	public String ns() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}

	public int ni() throws IOException {
		return Integer.parseInt(ns());
	}

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

	public long nl() throws IOException {
		return Long.parseLong(ns());
	}

	public long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for(int i = 0;i < n; ++i) a[i] = nl();
		return a;
	}

	public double nd() throws IOException {
		return Double.parseDouble(ns());
	}
}


import java.util.*;
import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.stream.*;

/**
 * @author Pradyumn
 */

public class Main implements Runnable{

	public static void main(String[] args) {
		new Thread(null, new Main(), ":)", 1 << 26).start();
	}
	@SuppressWarnings("Unchecked")
	public void solve() throws IOException {
		int n = ni();
		int p = ni();
		char[] s = ns(n);
		for(int i = n - 1;i >= 0; --i) {
			for(char c = (char)(s[i] + 1);c < 'a' + p; ++c) {
				s[i] = c;
				if(i - 1 >= 0 && s[i - 1] == s[i] || i - 2 >= 0 && s[i - 2] == s[i]) continue;
				inner:
				for(int j = i + 1;j < n; ++j) {
					for(char d = 'a';d < 'a' + p; ++d) {
						s[j] = d;
						if(j - 1 >= 0 && s[j - 1] == s[j - 1] || j - 2 >= 0 && s[j - 2] == s[j]) continue;
						continue inner;
					}
				}
				out.println(new String(s));
				return;
			}
		}
		out.println("NO");
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in),32768);
			st = null;
			out = new PrintWriter(System.out);
			solve();
			br.close();
			out.close();
		} catch(IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
	public char[] ns(int n) throws IOException {
		return ns().toCharArray();
	}
	public String ns() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}

	public int ni() throws IOException {
		return Integer.parseInt(ns());
	}

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

	public long nl() throws IOException {
		return Long.parseLong(ns());
	}

	public long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for(int i = 0;i < n; ++i) a[i] = nl();
		return a;
	}

	public double nd() throws IOException {
		return Double.parseDouble(ns());
	}
}