import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { //build the set - all the primes up to n //all multiples of the prime are not prime public static boolean isPrime(int n){ double rootN = Math.sqrt((double) n); if (rootN % 1 == 0) {return false;} else{ for (int d=2; d < (int) Math.floor(rootN); d++){ if (n % d == 0) { return false;} } return true; } } public static boolean primeGame(int n){ int count=0; for(int i=2; i<=n; i++){ //System.out.printf("currInt=%d, %b\n",i,isPrime(i)); if (isPrime(i)){ count++; } } //System.out.println(count); return (count%2 == 0); } 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(); // your code goes here boolean game = primeGame(n); if (game){ System.out.println("Bob");} else {System.out.println("Alice");} } } }