Given an array of n$n$ integers : A1,A2,...,An$ A_1, A_2,... , A_n$, find the longest size subsequence which satisfies the following property: The xor of adjacent integers in the subsequence must be non-decreasing.
-----Input:-----
- First line contains an integer n$n$, denoting the length of the array. 
- Second line will contain n$n$ space separated integers, denoting the elements of the array.
-----Output:-----
Output a single integer denoting the longest size of subsequence with the given property.
-----Constraints-----
- 1≤n≤103$1 \leq n \leq 10^3$
- 0≤Ai≤1018$0 \leq A_i \leq 10^{18}$
-----Sample Input:-----
8
1 200 3 0 400 4 1 7
-----Sample Output:-----
6
-----EXPLANATION:-----
The subsequence of maximum length is {1, 3, 0, 4, 1, 7} with Xor of adjacent indexes as {2,3,4,5,6} (non-decreasing)
n=int(input())
l=[int(i) for i in input().split()]
xors=[]
for i in range(n):
    for j in range(i+1,n):
     xors.append([l[i]^l[j],(i,j)])
xors.sort()
upto=[0]*n 
for i in range(len(xors)):
    a=xors[i][0]
    b,c=xors[i][1][0],xors[i][1][1]
    upto[c]=max(upto[c],upto[b]+1)
print(max(upto)+1)
n=int(input())
l=[int(i) for i in input().split()]
xors=[]
for i in range(n):
    for j in range(i+1,n):
     xors.append([l[i]^l[j],(i,j)])
xors.sort()
upto=[0]*n 
for i in range(len(xors)):
    a=xors[i][0]
    b,c=xors[i][1][0],xors[i][1][1]
    upto[c]=max(upto[c],upto[b]+1)
print(max(upto)+1)