//#include "/Users/priya/Desktop/competitiveProgrammingDocuments/VP/Header.h" #include //freopen ("/Users/priya/Desktop/B-small-attempt1.in","r",stdin); //freopen ("/Users/priya/Desktop/B-small-attempt1.out","w",stdout); using namespace std; #define ll long long int #define ull unsigned long long #define ul unsigned long #define ios ios::sync_with_stdio(0);cin.tie(0); #define eps 1e-4 #define PI acos(-1.0) #define printarray(a,n) for(ll i=1;i<=n;i++) cout< smallest power of n than given number /* WHERE WISHES ARE GRANTED When people bring you down, You shall rise, Never back down, Practice everyday, Till the last day.... */ #define MAX 100000128 int flagArr[MAX >> 6]; int arrVal[MAX]; #define ifComp(x) (flagArr[x>>6]&(1<<((x>>1)&31))) #define isComp(x) (flagArr[x>>6]|=(1<<((x>>1)&31))) void Sieve() { int i,j,k; for(i = 3 ; i < sqrt(MAX - 64) ; i+=2) { if(!ifComp(i)) { for(j = i * i , k = i << 1 ; j < (MAX - 64) ; j += k) isComp(j); } } arrVal[2]=1; for(i = 3 ; i < MAX - 64 ; i++) { if(i % 2 && !ifComp(i)) { arrVal[i] = arrVal[i-1] + 1; } else arrVal[i] = arrVal[i-1]; } } ll tt; ll n; int main(){ cin >> tt; Sieve(); while(tt --){ cin >> n; if(arrVal[n]&1) cout << "Alice" << endl; else cout << "Bob" << endl; } return 0; }