import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int countPrimes(int n) { if (n <= 2) return 0; // init an array to track prime numbers boolean[] primes = new boolean[n]; for (int i = 2; i < n; i++) primes[i] = true; for (int i = 2; i <= Math.sqrt(n - 1); i++) { // or for (int i = 2; i <= n-1; i++) { if (primes[i]) { for (int j = i + i; j < n; j += i) primes[j] = false; } } int count = 0; for (int i = 2; i < n; i++) { if (primes[i]) count++; } return count; } 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 int c=countPrimes(n+1); if (c%2==0) System.out.println("Bob"); else System.out.println("Alice"); } } }