//package com.company; import java.io.*; import java.util.*; import java.math.BigInteger; class Main1 { public static int[] generatePrimes(int n) { boolean[] prime = new boolean[n + 1]; Arrays.fill(prime, 2, n + 1, true); for (int i = 2; i * i <= n; i++) if (prime[i]) for (int j = i * i; j <= n; j += i) prime[j] = false; int[] primes = new int[n + 1]; int cnt = 0; for (int i = 0; i < prime.length; i++) if (prime[i]) primes[cnt++] = i; return Arrays.copyOf(primes, cnt); } //static HashMap h=new HashMap<>(); public static void main(String args[]) { FasterScanner in = new FasterScanner(); //Scanner in=new Scanner(System.in); out = new PrintWriter(new BufferedOutputStream(System.out)); int t=in.nextInt(); while (t-->0){ int n=in.nextInt(); int[] rr=generatePrimes(n); if(rr.length%2==1){ out.println("Alice"); } else out.println("Bob"); } out.println(); out.close(); } public static PrintWriter out; static class comp implements Comparator{ int m; comp(int m){ this.m=m; } public int compare(Integer n1,Integer n2){ return Integer.compare(n1%m,n2%m); } } static class FasterScanner { private byte[] buf = new byte[1024]; private int curChar; private int snumChars; public int read() { if (snumChars == -1) throw new InputMismatchException(); if (curChar >= snumChars) { curChar = 0; try { snumChars = System.in.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (snumChars <= 0) return -1; } return buf[curChar++]; } public double nextDouble() { return Double.parseDouble(this.nextString()); } public String nextLine() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndOfLine(c)); return res.toString(); } public String nextString() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int n) { int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = nextInt(); } return arr; } public long[] nextLongArray(int n) { long[] arr = new long[n]; for (int i = 0; i < n; i++) { arr[i] = nextLong(); } return arr; } private boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } } }