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(); answer(aliceWins(n)); } } public static boolean aliceWins(int n){ int k = countPrimes(n); return !(k % 2 == 0); } public static int countPrimes(int n){ boolean[] sieve = new boolean[n+1]; for(int i = 0; i < sieve.length; i++){ sieve[i] = true; } for(int i = 0; i < sieve.length; i++){ if (i == 0 || i == 1){ sieve[i] = false; } else if(sieve[i]){ for(int k = 2; k * i < sieve.length; k++){ sieve[k * i] = false; } } } int count = 0; for(int i = 0; i < sieve.length; i++){ if(sieve[i]) count++; } return count; } public static void answer(boolean win){ if(win){ System.out.println("Alice"); } else { System.out.println("Bob"); } } }