// ID: yunseo1026@yunseo1026.com
// PW: yunseo1026
#include <stdio.h>
// 중첩 반복문 안씀 / 조건문도 없음
int main()
{
int a[10000000]= {0,};
int b,c,d,i,j,h,t;
scanf("%d",&b);
for(i=1; i<=b; i++) {
scanf("%d",&c);
}
scanf("%d",&h);
for(j=1;j<=h;j++){
scanf("%d",&t);
a[b]=1;
printf("%d",a[b]);
}
return 0;
}



