#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define FOR(i,a,b) for(i=a;i<b;++i)
#define FORD(i,a,b) for(i=a;i>=b;--i)
#define FORIT(it,a,b) for(it=a;it!=b;it++)
#define tpI(i,a,b,v) for(i=a;i<b;i++) { p(v[i]);} pn();
#define tpL(i,a,b,v) for(i=a;i<b;i++) { pl(v[i]);} pn();
#define ll long long
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define infi 1000000007
#define ss(x) scanf("%s",x)
#define s(x) scanf("%d", &x)
#define sl(x) scanf("%lld", &x)
#define sd(x) scanf("%lf", &x)
#define fi first
#define se second
#define p(x) printf("%d ",x)
#define pl(x) printf("%lld ", x)
#define pd(x) printf("%lf ", x)
#define pn() printf("\n")
#define pc() printf("test \n")
#define pm(m) printf("%s\n",m)
#define pmv(m,x) printf("%s  -->  %d\n",m,x)
using namespace std;

int seive[100005]={0};
int ans[100005]={0};
void prime()
{
    int n=100000,i,j,count=0;
    for(i=2;i*i<=n;i++)
    {
        if(seive[i]==0)
        {
            for(j=i*i;j<=n;j=j+i)
            {
                seive[j]=1;    
            }
        }
    }
    for(i=2;i<=n;i++)
    {
        if(seive[i]==0)
        {
            count++;
        }
        ans[i]=count;
        
    }
}

int main()
{
    prime();
    int g;
    s(g);
    
    while(g--)
    {
        int n;
        s(n);
        if(ans[n]%2==0)
            pm("Bob");
        else
            pm("Alice");
    }
}