import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { /** * @param args the command line arguments */ static boolean primes[]; static int count[]; static final int MAX = 100000; static void init(){ primes = new boolean[MAX+1]; count = new int[MAX+1]; Arrays.fill(primes, true); primes[1] = false; for(int i=2;i<=MAX;i++){ count[i] = count[i-1]; if(primes[i]){ for(int j=2;j*i<=MAX;j++){ primes[i*j] = false; } count[i]++; } } } public static void main(String[] args) throws IOException{ // TODO code application logic here InputReader ir = new InputReader(); int g = ir.readInt(),n; init(); while(g-->0){ n = ir.readInt(); if(count[n]%2==1){ System.out.println("Alice"); } else{ System.out.println("Bob"); } } } final static class InputReader { //This IO class belongs to Ashok Rajpurohit (@ashok1113) byte[] buffer = new byte[8192]; int offset = 0; int bufferSize = 0; final InputStream in = System.in; public int readInt() throws IOException { int number = 0; int s = 1; if (offset == bufferSize) { offset = 0; bufferSize = in.read(buffer); } if (bufferSize == -1) { throw new IOException("No new bytes"); } for (; buffer[offset] < 0x30 || buffer[offset] == '-'; ++offset) { if (buffer[offset] == '-') { s = -1; } if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } for (; offset < bufferSize && buffer[offset] > 0x2f; ++offset) { number = (number << 3) + (number << 1) + buffer[offset] - 0x30; if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } ++offset; return number * s; } public int[] readIntArray(int n) throws IOException { int[] ar = new int[n]; for (int i = 0; i < n; i++) { ar[i] = readInt(); } return ar; } public int[] readIntArray1(int n) throws IOException { int[] ar = new int[n + 1]; for (int i = 1; i <= n; i++) { ar[i] = readInt(); } return ar; } public long readLong() throws IOException { long res = 0; int s = 1; if (offset == bufferSize) { offset = 0; bufferSize = in.read(buffer); } for (; buffer[offset] < 0x30 || buffer[offset] == '-'; ++offset) { if (buffer[offset] == '-') { s = -1; } if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } for (; offset < bufferSize && buffer[offset] > 0x2f; ++offset) { res = (res << 3) + (res << 1) + buffer[offset] - 0x30; if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } ++offset; if (s == -1) { res = -res; } return res; } public long[] readLongArray(int n) throws IOException { long[] ar = new long[n]; for (int i = 0; i < n; i++) { ar[i] = readLong(); } return ar; } public String read() throws IOException { StringBuilder sb = new StringBuilder(); if (offset == bufferSize) { offset = 0; bufferSize = in.read(buffer); } if (bufferSize == -1 || bufferSize == 0) { throw new IOException("No new bytes"); } for (; buffer[offset] == ' ' || buffer[offset] == '\t' || buffer[offset] == '\n' || buffer[offset] == '\r'; ++offset) { if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } for (; offset < bufferSize; ++offset) { if (buffer[offset] == ' ' || buffer[offset] == '\t' || buffer[offset] == '\n' || buffer[offset] == '\r') { break; } if (Character.isValidCodePoint(buffer[offset])) { sb.appendCodePoint(buffer[offset]); } if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } return sb.toString(); } public String read(int n) throws IOException { StringBuilder sb = new StringBuilder(n); if (offset == bufferSize) { offset = 0; bufferSize = in.read(buffer); } if (bufferSize == -1 || bufferSize == 0) { throw new IOException("No new bytes"); } for (; buffer[offset] == ' ' || buffer[offset] == '\t' || buffer[offset] == '\n' || buffer[offset] == '\r'; ++offset) { if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } for (int i = 0; offset < bufferSize && i < n; ++offset) { if (buffer[offset] == ' ' || buffer[offset] == '\t' || buffer[offset] == '\n' || buffer[offset] == '\r') { break; } if (Character.isValidCodePoint(buffer[offset])) { sb.appendCodePoint(buffer[offset]); } if (offset == bufferSize - 1) { offset = -1; bufferSize = in.read(buffer); } } return sb.toString(); } } }