#include <iostream>
using namespace std;

const int N = 1e5 + 10;

bool isPrime[N];
int pi[N];

void preprocess() {
	fill(isPrime, isPrime + N, true);
	isPrime[0] = isPrime[1] = false;
	for(int i = 2; i < N; i++) {
		if(isPrime[i]) {
			for(int j = 2*i; j < N; j += i)
				isPrime[j] = false;
		}
	}
	for(int i = 2; i < N; i++) {
		pi[i] = pi[i-1];
		if(isPrime[i])
			pi[i]++;
	}
}

int main() {
	//freopen("in", "r", stdin);
	preprocess();
	int g;
	scanf("%d", &g);
	while(g--) {
		int n;
		scanf("%d", &n);
		if(pi[n]%2 == 0)
			printf("Bob\n");
		else
			printf("Alice\n");
	}
}