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 re=2,g = in.nextInt(); int[] a=new int[100001]; int[] p=new int[100000]; p[0]=2; p[1]=3; int sum=2; a[1]=0; a[2]=1; a[3]=2; a[4]=2; int q=5; while(q<100001){ int w=1,t=0; while(p[w]<(int)Math.sqrt(q)+1){ if(q%p[w]==0){ t++; break; } w++; } if(t==0){ p[re]=q; re++; sum++; } a[q]=sum; a[q+1]=sum; q+=2; } for(int a0 = 0; a0 < g; a0++){ if(a[in.nextInt()]%2==0){ System.out.println("Bob"); } else{ System.out.println("Alice"); } // your code goes here } } }