/* ta yag odo batorshihiin code harj bn */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1000000009ll; const ll INFl = 9223372036854775807ll; const int inf = (1 << 30) - 1; #define ff first #define ss second #define pb push_back #define _N 100005 #define mk make_pair ll power(ll x, ll y, ll z) { ll t = 1; while (y > 0) { if (y % 2) { t = (t * x) % z; } x = (x * x) % z; y /= 2; } return t; } int movex[4] = {0, 1, -1, 0}; int movey[4] = {1, 0, 0, -1}; int S[_N]; bool p[_N]; int main () { // freopen ("std.in", "r", stdin); int i, j; for (i = 3;i <= _N - 2;i += 2) { if (!p[i]) { for (j = i * 2; j <= _N - 2; j += i) p[j] = 1; } } S[2] = 1; S[1] = 0; for (i = 3;i <= _N - 2; i ++) { S[i] = S[i - 1]; if (i % 2 == 0) continue; if (!p[i]) S[i] ++; } int n, T; scanf ("%d", &T); while (T --) { scanf ("%d", &n); if (S[n] % 2 == 0) printf ("Bob\n"); else printf ("Alice\n"); } return 0; }