#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } vector isprime; vector primes; void sieve(int n) { if ((int)isprime.size() >= n + 1) return; isprime.assign(n + 1, true); isprime[0] = isprime[1] = false; int sqrtn = (int)(sqrt(n * 1.) + .5); for (int i = 2; i <= sqrtn; i++) if (isprime[i]) { for (int j = i * i; j <= n; j += i) isprime[j] = false; } primes.clear(); for (int i = 2; i <= n; i++) if (isprime[i]) primes.push_back(i); } int main() { const int MaxN = 100000; sieve(MaxN); vector cnt(MaxN + 1); rep(i, MaxN) cnt[i + 1] = cnt[i] + isprime[i]; int T; scanf("%d", &T); for (int ii = 0; ii < T; ++ii) { int n; scanf("%d", &n); bool ans = cnt[n + 1] % 2 != 0; puts(ans ? "Alice" : "Bob"); } return 0; }