#include
int c[40],k=0;
int find(int a[],int x,int n)
{for(int i=0;iif(a[i]==x)return 1;
c[k++]=x;
return 0;
}
int read(int a[])
{int i,n;
scanf("%d",&n);
for(i=0;iscanf("%d",&a[i]);
return n;
}
int main()
{int n,m,i,a[20],b[20];
n=read(a);
m=read(b);
for(i=0;iif(!find(b,a[i],m))
if(!find(c,a[i],k-1))
printf("%d ",a[i]);
for(i=0;iif(!find(a,b[i],n))
if(!find(c,b[i],k-1))
printf("%d ",b[i]);
return 0;
}