#include #define sz(x) ((int) (x).size()) #define lld long long int #define MAX(a,b) (((a)>(b))?(a):(b)) using namespace std; template string toString(T x) {ostringstream ss; ss << x; return ss.str();} const int inf = 1000000000; bool prime[100001]; void SieveOfEratosthenes(int n) { // Create a boolean array "prime[0..n]" and initialize // all entries it as true. A value in prime[i] will // finally be false if i is Not a prime, else true. 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]) cout << p << " ";*/ } int counter(int x) { int c = 0; for(int i = 1 ; i <= x ; i++) { if(prime[i]) c++; } return c; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int g; cin >> g; SieveOfEratosthenes(100000); for(int i = 0 ; i < g ; i++) { int n ; cin >> n; if(counter(n) % 2 == 1) cout << "Bob" << endl; else cout << "Alice" << endl; } }