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(); List primes = sieve(n); if(primes.size() % 2 == 0) { System.out.println("Bob"); } else { System.out.println("Alice"); } } } public static List getListFromBitSet(BitSet set, int offset) { ArrayList primes = new ArrayList(); for (int j = set.nextSetBit(0); j != -1; j = set.nextSetBit(j + 1)) { primes.add(j + offset); } return primes; } public static List sieve(int n) { BitSet set = new BitSet(++n); set.flip(2, n); int i = 2; while (i < n && i != -1) { for (int j = i * 2; j < n; j += i) set.clear(j); i = set.nextSetBit(i + 1); } return getListFromBitSet(set, 0); } }