import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner readIn = new Scanner(System.in); ArrayList primes = new ArrayList(); primes.add(2); primes.add(3); for(int ii = 5; ii <= 100000; ii += 2) { Double sqrt = Math.sqrt(ii); boolean flag = true; for(int jj = 0; primes.get(jj) <= sqrt; jj++) { if(ii % primes.get(jj) == 0) { flag = false; break; } } if(flag) primes.add(ii); } int g = readIn.nextInt(); while(g-- > 0) { int n = readIn.nextInt(); int numberPrimes = Collections.binarySearch(primes, n); if(numberPrimes >= 0) numberPrimes++; else numberPrimes = -1 * numberPrimes - 1; String out = numberPrimes % 2 == 0 ? "Bob" : "Alice"; System.out.println(out); } } }