#include<bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define pb push_back
#define si(x) scanf("%d",&x)
#define pi(x) printf("%d\n",x)
#define s(x) scanf("%lld",&x)
#define p(x) printf("%lld\n",x)
#define sc(x) scanf("%s",x)
#define pc(x) printf("%s",x)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pis pair<string,int>
#define F first
#define S second
#define M 1000000007
#define N 100002
#define inf 1e9+10

using namespace std;

bool a[N];
int lpf[N]={0};
void sieve(){
int i,j;
for(i=0;i<N;i++) a[i]=true;
a[0]=false;a[1]=false;
for(i=2;i*i<N;i++){
    if(a[i]){
    for(j=i*i;j<N;j+=i){
        a[j]=false;
    }
    }
}

for(int i=1;i<=N;i++){
    lpf[i]=lpf[i-1]+a[i];
}
}

int main(){
sieve();
int t;
si(t);
while(t--){
    int n;
    si(n);
    int x=lpf[n]+1;
    //cout<<x<<endl;
    if(x%2==0)printf("Alice\n");
    else printf("Bob\n");
}

return 0;
}