import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static boolean prime[] = new boolean[100001]; public static void main(String[] args) { Arrays.fill(prime,true); sieveOfEratosthenes(); Scanner in = new Scanner(System.in); int g = in.nextInt(); int count = 0; for(int a0 = 0; a0 < g; a0++){ int n = in.nextInt(); count = getPrimes(n); if(count%2 == 0) System.out.println("Bob"); else System.out.println("Alice"); // your code goes here } } public static int getPrimes(int n) { int count = 0; for(int i = 2 ; i <= n ; i++) { if(prime[i]) count++; } return count; } static void sieveOfEratosthenes() { // Create a boolean array "prime[0..n]" and initialize // all entries it as true. A value in prime[i] will // finally be false if i is Not a prime, else true. int n = 100000; for(int p = 2; p*p <=n; p++) { // If prime[p] is not changed, then it is a prime if(prime[p] == true) { // Update all multiples of p for(int i = p*2; i <= n; i += p) prime[i] = false; } } } }