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) { boolean notPrime[] = new boolean[100000]; notPrime[0] = true; for (int i = 1; i < Math.sqrt(notPrime.length); i++) { if (!notPrime[i]) { for (int j = (i + 1) * (i + 1); j - 1 < notPrime.length; j+= (i + 1)) { notPrime[j - 1] = true; } } } int primesCounts[] = new int[100000]; int count = 0; for (int i = 0; i < 100000; i++) { if (!notPrime[i]) { count++; } primesCounts[i] = count; } Scanner in = new Scanner(System.in); int g = in.nextInt(); for(int a0 = 0; a0 < g; a0++){ int n = in.nextInt(); if (primesCounts[n - 1] % 2 == 1) { System.out.println("Alice"); } else { System.out.println("Bob"); } } } }