n,k=map(int,input().split()) d=int(input()) if d != 0: d_list=list(map(int,input().split())) else: d_list=[] c=int(input()) if c != 0: c_list=list(map(int,input().split())) else: c_list=[] dp=[False]*(n+1) for i in range(n+1): if i in d_list: dp[i]=False elif i in c_list: dp[i]=True else: if i==0: dp[i]=True elif i