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(); boolean arr[] = new boolean[n+1]; int count = 0; // your code goes here if(n==1 || n==3){ System.out.println("Bob"); }else if(n==2 || n==5){ System.out.println("Alice"); }else{ for(int i=0;i<=n;i++){ if(isPrime(i)) arr[i] = true; } for(int i=0;i<=n;i++){ //System.out.println(arr[i]); if(arr[i] == true){ count++; for(int j=i;j<=n;j+=i){ arr[j] = false; } } } if(count%2 == 0){ System.out.println("Alice"); } else{ System.out.println("Bob"); } } } } public static boolean isPrime(int i){ if(i<=1) return false; if(i==2 || i==3){ return true; } if(i%2 == 0) return false; for(int j=0;j<=Math.sqrt(j);j++){ if(j%i == 0) return false; } return true; } }