// fest #include #define pb push_back #define F first #define S second #define y1 dasdasfasfas #define x1 wqdadfasfasfas #define All(c) c.begin(), c.end() #define SZ(A) (int((A).size())) #define umap unordered_map #define __ fflush(stdout) typedef long long ll; typedef long double ld; using namespace std; inline double Time() {return (clock() * 1.0) / CLOCKS_PER_SEC; } const int N = 200500, inf = 1e9 * 2, MOD = 1e9 + 7; char CH[N]; const ll INF = 1e18; const int dx[] = {1, -1, 0, 0, -1, 1, -1, 1}; const int dy[] = {0, 0, 1, -1, -1, 1, 1, -1}; bool np[N]; int d[N]; int main() { unsigned int FOR; asm("rdtsc" : "=A"(FOR)); srand(FOR); np[1] = 1; for (int i = 2; i <= 1e5; i++) { if (np[i]) continue; for (int j = i + i; j <= 1e5; j += i) np[j] = 1; } for (int i = 1; i <= 1e5; i++) d[i] = d[i - 1] + (!np[i]); int n; cin >> n; for (int i = 1; i <= n; i++) { int x; cin >> x; puts(d[x] % 2 == 1 ? "Alice" : "Bob"); } return 0; }