/*Divyam Goyal - IIT-BHU*/ #include using namespace std; //freopen("input.txt","r",stdin);freopen("output.txt","w",stdout); #define trace1(x) cerr << #x << ": " << x << endl; #define trace2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl; #define trace3(x, y, z) cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl; #define trace4(a, b, c, d) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl; #define bitcount __builtin_popcountll #define sd(x) scanf("%d",&x) #define slld(x) scanf("%lld",&x) #define ss(x) scanf("%s",x) #define ll long long #define mp(a,b) make_pair(a,b) #define F first #define S second #define pb(x) push_back(x) #define MOD 1000000007 #define MAX 100005 bool prime[100007]; void sieve(int n) { memset(prime, true, sizeof(prime)); prime[1]=false, prime[0]=false; for(int i=4;i<=n;i+=2) prime[i]=false; for (int p=3; p*p<=n;p+=2) { if (prime[p] == true) { for (int i=p*p; i<=n; i += 2*p) prime[i] = false; } } } int f[100008]; int main() { //ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); sieve(100005); for(int i=2;i<=100000;i++) { f[i]=f[i-1]; if(prime[i]) f[i]++; } int g; cin>>g; while(g--) { int n; cin>>n; if(f[n]%2==0) cout<<"Bob"; else cout<<"Alice"; cout<<"\n"; } return 0; }