#include using namespace std; vectorv; void SieveOfEratosthenes(int n) { bool prime[n+1]; memset(prime, true, sizeof(prime)); for (int p=2; p*p<=n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p] == true) { // Update all multiples of p for (int i=p*2; i<=n; i += p) prime[i] = false; } } // Print all prime numbers for (int p=2; p<=n; p++) if (prime[p]) v.push_back(p); } // Driver Program to test above function int main() { int n , x; int ans = 0; cin >> x; while(x--){ ans = 0; cin >> n ; SieveOfEratosthenes(n); ans = v.size(); cout << ((ans%2)? "Alice" : "Bob") << endl; v.clear(); } return 0; }