import sys from itertools import permutations from heapq import heappop,heappush from collections import deque import random import bisect input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) G = [0,1,1,2,2,4,4] def calc_grundy(a): if a <= 6: return G[a] """ (1,1,2,2,4,4) (4n+6,4n+8,4n+8) n = 1,2,... """ n = (a-6+2)//3 if (a-6) % 3 == 1: return 4 * n + 2 else: return 4 * n + 4 for _ in range(int(input())): N = int(input()) A = li() g = 0 for a in A: g ^= calc_grundy(a) print("Alice" if g!=0 else "Bob")