import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int[] primes = new int[100001]; static int where = 1; 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 fillPrimes(n); if(primes[n]%2 == 0) System.out.println("Bob"); else System.out.println("Alice"); } } public static boolean isPrime(int n){ if(n <= 1) return false; if(n == 2 || n == 3) return true; if(n%2 == 0) return false; else{ for(int i=3; i*i<=n; i+=2){ if(n%i==0){ return false; } } } return true; } public static void fillPrimes(int n){ for(int i=where; i<=n; i++){ if(isPrime(i)){ primes[i] = primes[i-1] + 1; } else{ primes[i] = primes[i-1]; } } where = n; } }