#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>

using namespace std;

const int maxn = 1e5+5;
int count_prime[maxn];
bool is_prime[maxn];

void get_is_prime() {
    for (int i = 0; i < maxn; ++i) {
        is_prime[i] = true;
    }
    for (int i = 2; i < maxn; ++i) {
        if (!is_prime[i])
            continue;
        for (int j = 2; j * i < maxn; ++j) {
            is_prime[j*i] = false;
        }
    }
}

void get_count_prime() {
    // count how many primes are there in 1...n
    int current = 0;
    for (int i = 0; i < maxn; ++i) {
        if (is_prime[i])
            current ++;
        count_prime[i] = current;
    }
}

int main(){
    get_is_prime();
    get_count_prime();
    int g;
    cin >> g;
    for(int a0 = 0; a0 < g; a0++){
        int n;
        cin >> n;
        cout<<(count_prime[n] % 2 ? "Alice":"Bob")<<endl;
        // your code goes here
    }
    return 0;
}