1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 #include<math.h> 5 using namespace std; 6 char a[5][10],b[5][10],c[5][10]; 7 int main() 8 { 9 int t,n,m,i,j,k; 10 while(scanf("%d%d%d",&t,&n,&m)!=EOF) 11 { 12 for(i=0;i<t;i++) 13 scanf("%s",a[i]); 14 for(i=0;i<n;i++) 15 scanf("%s",b[i]); 16 for(i=0;i<m;i++) 17 scanf("%s",c[i]); 18 int temp=0; 19 for(i=0;i<n;i++) 20 for(j=0;j<t;j++) 21 if(strcmp(b[i],a[j])==0) 22 { 23 int flag=0; 24 for(k=0;k<m;k++) 25 { 26 if(strcmp(b[i],c[k])==0) 27 flag=1; 28 } 29 if(flag==0) 30 { 31 printf("%s ",b[i]); 32 temp=1; 33 } 34 else 35 break; 36 } 37 if(temp==0) 38 printf("No enemy spy "); 39 else 40 printf(" "); 41 getchar(); 42 } 43 return 0; 44 }