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

public class aplusb_md implements Runnable {
	private BufferedReader in;
	private PrintWriter out;
	private final char FIRST = 'a';
	private final int SIZE = 26;

	public void run() {
		try {
			solve();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	private void solve() throws IOException {
		Locale.setDefault(Locale.US);
		in = new BufferedReader(new FileReader("aplusb.in"));
		out = new PrintWriter("aplusb.out");
		StringTokenizer st = new StringTokenizer(in.readLine());
		int n = Integer.parseInt(st.nextToken());
		int v = Integer.parseInt(st.nextToken());
		boolean[][] set = new boolean[n][SIZE];
		for (int i = 0; i < v; i++) {
			String s = in.readLine();
			for (int j = 0; j < n; j++) {
				set[j][s.charAt(j) - FIRST] = true;
			}
		}
		String a = in.readLine();
		String b = in.readLine();
		StringBuilder c = new StringBuilder(n);
		c.setLength(n);
		char[] chars = new char[SIZE];
		int carry = 0;
		for (int i = n - 1; i >= 0; i--) {
			int mod = 0;
			int sa = a.charAt(i) - FIRST;
			int sb = b.charAt(i) - FIRST;
			for (int j = 0; j < SIZE; j++) {
				if (!set[i][j]) {
					chars[mod] = (char) (FIRST + j);
					if (sa == j)
						carry += mod;
					if (sb == j)
						carry += mod;
					mod++;
				}
			}
			c.setCharAt(i, chars[carry % mod]);
			carry /= mod;
		}
		out.println(c);
		in.close();
		out.close();
	}

	public static void main(String[] args) {
		new Thread(new aplusb_md()).start();
	}
}
