#include using namespace std; #define ll long long #define mod 1000000007 #define eps 1e-13 #define PI 3.14159265359 #define INF 1000000011 #define INFLL 1000000000000000011LL #define space printf(" ") #define endl printf("\n") #define vi vector #define vll vector #define vc vector #define vs vector #define pii pair #define pll pair #define pil pair #define pli pair #define pcc pair #define mp make_pair #define F first #define S second #define pb(x) push_back(x) #define fo(i,a,n) for(i = (a); i < (n); i++) #define foi(i,a,n) for(int i = (int)(a); i < (int)(n); i++) #define foll(i,a,n) for(long long i = (long long)(a); i < (long long)(n); i++) #define sd(x) scanf("%d", &(x)) #define pd(x) printf("%d", (x)) #define pdn(x) printf("%d\n", (x)) #define slld(x) scanf("%lld", &(x)) #define plld(x) printf("%lld", (x)) #define plldn(x) printf("%lld\n", (x)) #define sllf(x) scanf("%llf", &(x)) #define pllf(x) printf("%.9llf", (x)) #define pllfn(x) printf("%.9llf\n", (x)) #define sch(x) scanf("%c", &(x)) #define pch(x) printf("%c", (x)) #define pchn(x) printf("%c\n", (x)) #define gtl(x) getline(cin, (x)) #define flsh fflush(stdout) #define sws ios::sync_with_stdio(false); cin.tie(0) #define gcd __gcd #define clr(x) memset(x,0,sizeof(x)) #define all(a) (a).begin(), (a).end() #define foreach(i,a) for(__typeof((a).begin()) i = (a).begin(); i != (a).end(); ++i) #define sz(a) (int)((a).size()) /*ll gcd(ll a, ll b) { if(b == 0) return a; return gcd(b, a%b); }*/ ll modx(ll Base, ll exponent) { ll ans = 1; if(Base == 1) return Base; while(exponent) { if(exponent & 1) ans = (ans * Base)%mod; Base = (Base * Base)%mod; exponent = exponent >> 1; } return ans; } ll inmodx(ll num) { return (modx(num, mod-2LL)); } struct node { node() { } }; bool cmp() { return false; } const int N = 100009; bool isp[N]; int cnt[N]; void sieve(int n) { int i, j, l; l = (int)(sqrt(n)) + 5; isp[0] = isp[1] = 1; fo(i,2,l) { if(!isp[i]) { for(j = i+i; j <= n; j+=i) isp[j] = 1; } } cnt[0] = cnt[1] = 0; cnt[2] = 1; fo(i,3,n+1) { if(!isp[i]) cnt[i] = cnt[i-1] + 1; else cnt[i] = cnt[i-1]; } } int main() { // freopen("D:/Coding Problems/Contest/input_file.in", "r", stdin); // freopen("D:/Coding Problems/Contest/output_file.out", "w", stdout); sws; sieve(100000); int n, g, ans; cin >> g; while(g--) { cin >> n; ans = cnt[n]%2; if(ans == 0) cout << "Bob\n"; else cout << "Alice\n"; } return 0; }