import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) #input = sys.stdin.readline #n = int(input()) # #alist = [] #s = input() input = sys.stdin.readline t = int(input()) for i in range(t): n = int(input()) a = list(map(int,input().split())) cnt = 0 for j in a: cnt ^= ([0,1,1,2,2][j]) if j <= 4 else ((j - 5)//3 * 4 + 4 + (2 if (j-5)%3 == 2 else 0)) if cnt == 0: print('Bob') else: print('Alice')