#include using namespace std; typedef long long ll; typedef long double ld; const int MAX = 100 * 1000 + 7; int pr[MAX], ps[MAX]; int main() { #ifdef LOCAL freopen("input.txt", "r", stdin); #endif for (int i = 2; i < MAX; i++) { pr[i] = 1; } for (int i = 2; i < MAX; i++) { if (!pr[i]) continue; for (int j = i + i; j < MAX; j += i) { pr[j] = 0; } } for (int i = 1; i < MAX; i++) { ps[i] = ps[i - 1] + pr[i]; } int t; scanf("%d", &t); for (int tt = 1; tt <= t; tt++) { int n; scanf("%d", &n); if (ps[n] % 2 != 0) { printf("Alice\n"); } else { printf("Bob\n"); } } }