#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=1; p<=n; p++) // if (prime[p]) // cout << p << " "; } int count_primes_to(int n) { int ret = 0; for(int i = 1; i <= n; i++) { if(prime[i]) ret += 1; } return ret; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); SieveOfEratosthenes(100000); int g; cin >> g; for(int i = 0; i < g; i++) { int n; cin >> n; if(count_primes_to(n) % 2 == 1 ) cout << "Bob" << endl; else cout << "Alice" << endl; } return 0; }