import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static final int MAX_N = 100000; private static final TreeSet PRIMES = new TreeSet<>(); static { PRIMES.add(2); for (int i=3; i<=MAX_N; i+=2) { if (isPrime(i)) { PRIMES.add(i); } } } public static void main(String[] args) { Scanner in = new Scanner(System.in); int g = in.nextInt(); for(int a0 = 0; a0 < g; a0++){ int n = in.nextInt(); int countOfPrimes = PRIMES.headSet(n, true).size(); System.out.println(countOfPrimes%2 == 0 ? "Bob" : "Alice"); } in.close(); } private static boolean isPrime(int num) { if (num<=1) return false; for (int div=2; div<=Math.sqrt(num); div++) { if (num%div == 0) { return false; } } return true; } }