#include<stdio.h>
#include<string.h>
char str1[25][100],str2[25][100],ch[100],str3[25][100];
int m,n,ans[25];
int judge(char c)
{
if(c>='a'&&c<='z')
return 1;
return 0;
}
void init()
{
int i,j;
for(i=0;i<n;i++) scanf("%s",str1[i]);
getchar();
for(i=0;i<m;i++) gets(str2[i]);
for(i=0;i<m;i++)
{
for(j=0;str2[i][j];j++)
{
str3[i][j]=str2[i][j];
if(str2[i][j]>='A'&&str2[i][j]<='Z')
str2[i][j]=str2[i][j]-'A'+'a';
}
str3[i][j]=0;
}
}
int main()
{
int i,j,x,y,k,ca=1,sum,max;
while(scanf("%d%d",&n,&m)!=-1)
{
memset(ans,-1,sizeof(ans));
init();
x=0;y=0;max=0;
for(i=0;i<m;i++)
{
sum=0;
for(j=0;str2[i][j];j++)
{
ch[x++]=str2[i][j];
if(judge(ch[x-1])==0)
{
if(x==1)
{
x=0;
continue;
}
else
{
ch[x-1]=0;
for(k=0;k<n;k++)
if(strcmp(ch,str1[k])==0)
sum++;
}
x=0;
}
}
if(sum>=max)
{
if(sum==max)
ans[++y]=i;
else
{
max=sum;
y=0;
ans[y]=i;
}
}
}
printf("Excuse Set #%d\n",ca++);
for(i=0;ans[i]!=-1;i++)
puts(str3[ans[i]]);
printf("\n");
}
return 0;
}