N개의 정수 A[1], A[2], …, A[N]이 주어져 있을 때, 이 안에 X라는 정수가 존재하는지 알아내는 프로그램을 작성하시오.
n = int(input())
array = set(map(int, input().split(" ")))
m = int(input())
data = list(map(int, input().split(" ")))
for i in data:
if i in array:
print("1")
else:
print("0")