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(); int count=countPrime(n); if(count%2!=0) System.out.println("Alice"); else System.out.println("Bob"); } } public static int countPrime(int n) { int count=0; int i=2; while(i<=n) { if(i%2==0&&i!=2) i++; else { boolean flag=true; int s=(int)Math.sqrt(i); for(int j=2;j<=s;j++) { if(i%j==0) { flag=false; break; } } if(flag) count++; i++; } } return count; } }