T=int(input()) for _ in range(T): n=int(input()) a=list(map(int,input().split())) g=0 for v in a: if v<=4: g^=(v+1)//2 else: g^=2+((v-5)//3+1)*4+2*((v-4)%3!=0) print(["Bob","Alice"][g>0])