import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { 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(); System.out.println(run(n)); } } private static String run(int n) { if (n == 1) { return "Bob"; } if (n == 2) { return "Alice"; } return countPrimeNumbers(n) % 2 == 0 ? "Bob" : "Alice"; } private static int countPrimeNumbers(final int max) { // max >= 3 int cnt = 1; // 2 final int arrSize = (max - 3) / 2 + 1; // 3, 5, 7, ... // final List answer = new ArrayList<>(); // answer.add(2); final boolean[] excluded = new boolean[arrSize]; for (int i = 0; i < arrSize; i++) { if (!excluded[i]) { final int p = i + i + 3; // answer.add(p); cnt++; for (int j = i + p; j < arrSize; j += p) { excluded[j] = true; } } } // return answer; // return excluded; return cnt; } }