#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int intcmp(const void *a,const void *b)
{
return (*(int *)a - *(int *)b);
}
int _Bsearch(int f,int *count,int n) //二分查找下界
{
int mid,left = 0,right = n - 1;
while(left < right)
{
mid = left + (right - left) /2;
if(count[mid] >= f) right = mid;
else left = mid + 1;
}
if(count[left] == f)
return left + 1;
else
return 0;
}
int main()
{
int number[1000000];
int f[1000000];
int m,n,k = 0;
while(scanf("%d%d",&m,&n) == 2)
{
if(m == 0 && n==0)
return 0;
k++;
int i;
memset(number,0,sizeof(number));
memset(f,0,sizeof(f));
for(i = 0;i < m;i++)
scanf("%d",&number[i]);
for(i = 0;i < n;i++)
scanf("%d",&f[i]);
qsort(number,m,sizeof(int),intcmp);
printf("CASE# %d:/n",k);
for(i = 0;i < n;i++)
{
int location;
location = _Bsearch(f[i],number,m);
if(location != 0)
printf("%d found at %d/n",f[i],location);
else
printf("%d not found/n",f[i]);
}
}
return 0;
}