#!/bin/python3 import sys L = int(1e5+5)*[True] L[0] = False ; L[1] = False i = 2 while( i*i < len(L)): if( L[i] == True): j = i*i while( j < len(L) ): L[j] = False j += i i+=1 g = int(input().strip()) for a0 in range(g): n = int(input().strip()) cnt = 0 for j in range(2,n+1): if( L[j] == True): cnt+=1 #print(cnt) if( cnt % 2 == 1): print('Alice') else: print('Bob') # your code goes here