#include using namespace std; const int inf = INT_MAX; const int SIZE=100001; int isprime[SIZE]; int DP[SIZE]; void sieve(){ isprime[0] = isprime[1] = 1; for(int i = 4; i < SIZE; i += 2){ isprime[i] = 1; } for(int i = 3; i < sqrt(SIZE)+1.5; i += 2){ if(!isprime[i]){ for(int j = i*i; j < SIZE; j += 2*i){ isprime[j] = 1; } } } for(int i = 2; i < SIZE; i += 1){ if(!isprime[i]) DP[i] = DP[i-1]+1; else DP[i] = DP[i-1]; } } int main(void){ ios::sync_with_stdio(false); sieve(); int g; cin >> g; while(g--){ int n; cin >> n; if(DP[n]%2) cout << "Alice" << endl; else cout << "Bob" << endl; } }