import java.io.*; import java.util.ArrayList; import java.util.StringTokenizer; public class Solution { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(in, out); out.close(); } static class Task { public void solve(InputReader scan, PrintWriter out) { int t=scan.nextInt(); for (int i = 0; i < t; i++) { int count; int n=scan.nextInt(); if(n==2) count=1; else if(n==3) count=0; else{ boolean prime[] = new boolean[n + 1]; for (int j = 0; j < n+1; j++) prime[j] = true; count=0; for (int p = 2; p * p <= n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]) { count++; // Update all multiples of p for (int j = p * 2; j <= n; j += p) prime[j] = false; } } } if(count%2==0) out.println("Bob"); else out.println("Alice"); } } } 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()); } } }