#include #include #include #include #include #include using namespace std; #define MAX 100000 int till[MAX+1]; bool isPrime[MAX+1]; void sieve(){ memset(isPrime,true,sizeof(isPrime)); for(int i=2 ; i*i<=MAX ; i++){ if(isPrime[i]){ for(int j=i*i ; j<=MAX ; j+=i){ isPrime[j] = false; } } } till[0] = 0; till[1] = 0; for(int i=2 ; i<=MAX ; i++){ if(isPrime[i]) till[i] = till[i-1]+1; else till[i] = till[i-1]; } } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ sieve(); int g; cin >> g; while(g--){ int n; cin >> n; if(till[n]%2) cout << "Alice"; else cout << "Bob"; cout << "\n"; } return 0; }