import sequtils,strutils,algorithm proc r():any=stdin.readLine.parseInt proc R():any=stdin.readLine.split.map(parseInt).sorted(cmp,Descending) var N=r() K=1 shl N A=R() M=r() B=R() S=newSeq[int]K for n in 0..=0) if U[K-1]:quit "1",0 for i in 0..=0:V[x xor y]=true U=V if U[K-1]:quit $(i+2),0 echo -1