#include "stdio.h"
int main()
{
int n,m,i,j,temp,flag;
int a[220],b[100];
while(scanf("%d %d",&n,&m))
{
temp=0;
flag=0;
if(n==0 && m==0)
break;
for(i=0;iscanf("%d",&a[i]);
for(i=0;i{
for(j=n;j{
if(a[i]==a[j])
break;
}
if(j==m+n)
flag=1;
if(flag==1)
b[temp++]=a[i];
flag=0;
}
if(temp==0)
printf("NULL");
else
for(i=0;i{
for(j=i;j{
if(b[i]>b[j])
n=b[j],b[j]=b[i],b[i]=n;
}
}
for(i=0;iif(i==0 || b[i] != b[i-1])
printf("%d ",b[i]);
printf("\n");
}
return 0;
}