import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { 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(); final List primes = sieveOfEratosthenes(n); if(primes.size() % 2 != 0) { System.out.println("Alice"); } else { System.out.println("Bob"); } } } private static List sieveOfEratosthenes(int N) { final BitSet prime = new BitSet(Math.max(3, N + 1)); final List primes = new ArrayList<>(); prime.set(0, false); prime.set(1, false); prime.set(2, N + 1, true); final int m = (int) Math.sqrt(N) + 1; for (int i = 2; i <= m; i++) { if (prime.get(i)) { primes.add(i); for (int k = i * i; k <= N; k += i) { prime.set(k, false); } } } for (int i = m + 1; i <= N; i++) { if (prime.get(i)) { primes.add(i); } } return primes; } }