#include using namespace std; #define debug(x) cout << #x " = " << (x) << endl const int MN = 100000 + 100; namespace primes { const int MP = MN; bool sieve[MP]; long long primes[MP]; int num_p; void fill_sieve() { num_p = 0; sieve[0] = sieve[1] = true; for (long long i = 2; i < MP; ++i) { if (!sieve[i]) { primes[num_p++] = i; for (long long j = i * i; j < MP; j += i) sieve[j] = true; } } } // Finds prime numbers between a and b, using basic primes up to sqrt(b) vector seg_sieve(long long a, long long b) { long long ant = a; a = max(a, 3LL); vector pmap(b - a + 1); long long sqrt_b = sqrt(b); for (int i = 0; i < num_p; ++i) { long long p = primes[i]; if (p > sqrt_b) break; long long j = (a + p - 1) / p; for (long long v = (j == 1) ? p + p : j * p; v <= b; v += p) { pmap[v - a] = true; } } vector ans; if (ant == 2) ans.push_back(2); int start = a % 2 ? 0 : 1; for (int i = start, I = b - a + 1; i < I; i += 2) if (pmap[i] == false) ans.push_back(a + i); return ans; } } int main() { #ifndef LOCAL #define endl '\n' ios_base::sync_with_stdio(false);cin.tie(NULL); #endif primes::fill_sieve(); vector acc(MN); for (int i = 0; i < MN; ++i) { if (i) acc[i] += acc[i - 1]; acc[i] += (primes::sieve[i] == 0); } int g; cin >> g; while (g--) { int t; cin >> t; puts(acc[t] & 1 ? "Alice" : "Bob"); } return 0; }