//#define _GLIBCXX_DEBUG #include using namespace std; #define pb push_back #define mp make_pair typedef long long ll; typedef vector vi; typedef vector vvi; typedef vector vll; typedef pair pii; typedef vector vii; #define sz(c) (int)(c).size() #define ALL(c) (c).begin(), (c).end() void solve (int n) { const int bound = (int)1e5 + 10; static vector isprime(bound, 1); static bool calc = false; if (!calc) { calc = true; isprime[0] = isprime[1] = 0; for (int i = 2; i < bound; i++) if (isprime[i]) for (int j = 2 * i; j < bound; j += i) isprime[j] = 0; } int ans = 0; for (int i = 2; i <= n; i++) ans += isprime[i]; cout << (ans % 2 == 0 ? "Bob" : "Alice") << '\n'; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t; cin >> t; int n; while (cin >> n) solve(n); }