#include #include #include #include #include #include #define IOS ios::sync_with_stdio(false) using namespace std; #define inf (0x3f3f3f3f) typedef long long int LL; #include #include #include #include #include #include #include const int maxn = 1e6 + 20; int prime[maxn]; bool check[maxn]; int total; void initprime() { for (int i = 2; i <= maxn - 20; i++) { if (!check[i]) { prime[++total] = i; } for (int j = 1; j <= total; j++) { if (i * prime[j] > maxn - 20) break; check[i * prime[j]] = 1; if (i % prime[j] == 0) break; } } return ; } void work() { int n; cin >> n; int pos = upper_bound(prime + 1, prime + 1 + total, n) - prime; pos--; if (pos & 1) { cout << "Alice" << endl; } else cout << "Bob" << endl; } int main() { #ifdef local freopen("data.txt", "r", stdin); // freopen("data.txt", "w", stdout); #endif IOS; initprime(); int t; cin >> t; while (t--) work(); return 0; }