{$O-,Q+,R+}
uses SysUtils, Math;

const MaxP = 100000;


procedure readr (var x:integer; a, b:integer);
begin
  assert (not seekeoln); read (x); assert ((a<=x) and (x<=b));
end;
procedure readl;
var c:char;
begin
  {$IFNDEF LINUX}
  read (c); assert (c=#13); 
  {$ENDIF}
  read (c); assert (c=#10);
end;

var f : array [1..MaxP, 'a'..'z'] of boolean;
    n1, n2, b : array [1..MaxP] of integer;
    i, n, l, j, cy : integer;
    s : string;
    w : array [1..MaxP] of string;
    c : char;


begin
  readr (n, 1, MaxP); readr (l, 1, MaxP); readl;
  for i := 1 to l do begin
    readln (s);
    w[i] := s;
    for j := 1 to n do begin
      f[j, s[j]] := true;
    end;
  end;
  readln (s); assert (length (s) = n);
  for i := 1 to n do begin
    for c := 'a' to pred (s[i]) do
      if not f[i, c] then inc (n1[i]);
  end;
  readln (s);
  for i := 1 to n do begin
    for c := 'a' to pred (s[i]) do
      if not f[i, c] then inc (n2[i]);
  end;
  for i := 1 to n do
    for c := 'a' to 'z' do
      if not f[i, c] then inc (b[i]);
  cy := 0;
  for i := n downto 1 do begin
    inc (cy, n1[i] + n2[i]);
    if (cy >= b[i]) then begin n1[i] := cy - b[i]; cy := 1 end else
                         begin n1[i] := cy; cy := 0 end;
  end;
  for i := 1 to n do begin
    for c := 'a' to 'z' do
      if not f[i, c] then begin
        if n1[i] = 0 then write (c);
        dec (n1[i]);
      end;
  end;
  writeln;
end.