maxi=100000
b=[1 for x in range(maxi+1)]
b[0],b[1]=0,0
ind=2
while ind<=1000:
    if b[ind]==1:
        y=ind+ind
        while y<=maxi:
            b[y]=0
            y+=ind        
    ind+=1            
c=[0 for x in range(maxi+1)]
for x in range(1,maxi+1):
    c[x]=c[x-1]+b[x]

t=int(input().strip())
for x in range(t):
    n=int(input().strip())
    if n==1:    print("Bob")
    else:
        if c[n]%2==1:   print("Alice")            
        else:           print("Bob")