#!/bin/python import sys #number of primes <= 10^5 maxp = 10**5 cc = [0]*(maxp + 1) lp = [2,3] cc[0] = 0; cc[1] = 0; cc[2] = 1; cc[3] = 2; i = 4 while i <= maxp: isPrime = True j = 0 while j < len(lp) and lp[j]**2 <= i: if i%lp[j] == 0: isPrime = False break j += 1 if isPrime: lp.append(i) cc[i] += 1 cc[i] += cc[i-1] i += 1 g = int(raw_input().strip()) for a0 in xrange(g): n = int(raw_input().strip()) print "Alice" if cc[n]%2 == 1 else "Bob"