#include #include #include #include #include using namespace std; vector primes(100005, false); vector no_primes(100001, 0); int main() { //freopen("txt.in", "r", stdin); int n, maxx = 0, x; cin >> n; vector q; for(int i = 1; i <= n; ++i) { cin >> x; if(x > maxx) maxx = x; q.push_back(x); } primes[1] = true; int crnt = 0; for(int i = 2; i <= maxx; ++i){ if(primes[i] == false){ crnt++; for(int j = i + i; j <= maxx; j += i) primes[j] = true; } no_primes[i] = crnt; } for(int i = 0; i < q.size(); ++i){ if(no_primes[q[i]] % 2 == 1) cout << "Alice\n"; else cout << "Bob\n"; } return 0; }