import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Test { public static int w = 100001; public static void main(String[] args) throws IOException { boolean[] isPrime = new boolean[w+1]; for (int i = 2; i <= w; i++) { isPrime[i] = true; } for (int factor = 2; factor * factor <= w; factor++) { if (isPrime[factor]) { for (int j = factor; factor * j <= w; j++) { isPrime[factor * j] = false; } } } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int g = Integer.parseInt(br.readLine()); boolean alice = false; boolean bob = false; for (int i = 0; i < g; i++) { int counter=0; int n = Integer.parseInt(br.readLine()); boolean arr[] = new boolean[n]; for (int j = 1; j <= n; j++,counter++) { if (isPrime[j]) { while (j <= n) { arr[j-1] = true; j=j*j; } if(counter%2!=0) { alice=true; bob=false; } else if(counter%2==0) { alice=false; bob=true; } } } if (alice) { System.out.println("Alice");//System.out.println(alicebob); } else if (bob) { System.out.println("Bob");//System.out.println(alicebob); } else { System.out.println("Bob"); } } } }