import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } public static void main(String args[]) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); solve(in, out); out.close(); } private static void solve(InputReader in, PrintWriter out) { int G = in.nextInt(); int cPrimes[] = new int[100005]; cPrimes[0] = 0; cPrimes[1] = 0; countPrimes(100000, cPrimes); for (int i = 0; i < G; i++) { int N = in.nextInt(); int answer = cPrimes[N]; if (answer % 2 == 0) { out.println("Bob"); } else { out.println("Alice"); } } } private static void countPrimes(int n, int[] cPrimes) { boolean[] primes = new boolean[n+1]; for (int i = 2; i <= n; i++) { primes[i] = true; } for (int i = 2; i <= Math.sqrt(n); 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++; } cPrimes[i] = count; } } }