import sys input = sys.stdin.readline N,L,R=map(int,input().split()) A=list(map(int,input().split())) ANS=[-1]*62 for i in range(1,N): if A[i]==A[i-1]: print(0) sys.exit() for i in range(61,-1,-1): B=[a>>i for a in A] C=[b^1 for b in B] flagb=1 flagc=1 for j in range(1,N): if B[j-1]>B[j]: flagb=0 if C[j-1]>C[j]: flagc=0 if flagb and flagc: ANS[i]=2 elif flagb: ANS[i]=0 elif flagc: ANS[i]=1 A=[a^(1<