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

public class aplusb_gk {
    static Scanner in;
    static PrintWriter out;

    public void run() {
        int n = in.nextInt();

        String[] s = new String[in.nextInt()];
        for (int i = 0; i < s.length; i++) {
            s[i] = in.next();
        }

        boolean[][] u = new boolean[n][26];
        int[] r = new int[n];
        for (int i = 0; i < n; i++) {
            r[i] = 26;
            for (int j = 0; j < s.length; j++) {
                int ch = s[j].charAt(i) - 'a';
                if (!u[i][ch]) {
                    u[i][ch] = true;
                    r[i]--;
                }
            }
        }

        String sa = in.next();
        String sb = in.next();
        int[] c = new int[n];
        for (int i = n - 1; i >= 0; i--) {
            c[i] += sa.charAt(i) - 'a' + sb.charAt(i) - 'a';
            for (int j = 0; j < 26; j++) {
                if (u[i][j]) {
                    if (sa.charAt(i) - 'a' > j) c[i]--;
                    if (sb.charAt(i) - 'a' > j) c[i]--;
                }
            }
            if (i > 0) c[i - 1] += c[i] / r[i];
            c[i] %= r[i];
        }

        StringBuilder sc = new StringBuilder();

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 26; j++) {
                if (!u[i][j]) {
                    if (c[i]-- == 0) {
                        sc.append((char) ('a' + j));
                        break;
                    }
                }
            }
        }

        out.format("%s\n", sc);
    }

    public static void main(String[] args) throws Exception {        
        in = new Scanner(new File("aplusb.in"));
        out = new PrintWriter("aplusb.out");

        new aplusb_gk().run();

        in.close();
        out.close();
    }
}
