#include #define ll long long #define mod 1000000007 #define upperlimit 1000100 #define INF 1000000100 #define INFL 1000000000000000100 #define eps 1e-8 #define endl '\n' #define sd(n) scanf("%d",&n) #define slld(n) scanf("%lld",&n) #define pd(n) printf("%d",n) #define plld(n) printf("%lld",n) #define pds(n) printf("%d ",n) #define pllds(n) printf("%lld ",n) #define pdn(n) printf("%d\n",n) #define plldn(n) printf("%lld\n",n) #define REP(i,a,b) for(i=a;i<=b;i++) #define mp make_pair #define pb push_back #define pcc pair #define pii pair #define pll pair #define vi vector #define vl vector #define vii vector #define vll vector #define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++) #define F first #define S second using namespace std; ll gcd(ll n1,ll n2){ if(!n1)return n2; if(!n2)return n1; if(n1%n2==0)return n2; return gcd(n2,n1%n2); } ll powmod(ll base,ll exponent) { base%=mod; ll ans=1; while(exponent){ if(exponent&1)ans=(ans*base)%mod; base=(base*base)%mod; exponent/=2; } ans%=mod; return ans; } bool prime[upperlimit+1]; int primes[upperlimit+1]; int main() { int t,i,j,k,n; for(i=2;i*i<=upperlimit;i++)if(!prime[i])for(j=i*i;j<=upperlimit;j+=i)prime[j]=true; for(i=2;i<=upperlimit;i++){ primes[i]=primes[i-1]; if(!prime[i])primes[i]++; } sd(t); while(t--){ sd(n); if(primes[n]&1)printf("Alice\n"); else printf("Bob\n"); } return 0; }