using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Collections; class Solution { static void Main(String[] args) { int g = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < g; a0++){ int n = Convert.ToInt32(Console.ReadLine()); var result=Primes(n); int count=0; foreach(var it in result) count++; if(count % 2==0) Console.WriteLine("Bob"); else Console.WriteLine("Alice"); } } public static IEnumerable Primes(int bound) { if (bound < 2) yield break; //The first prime number is 2 yield return 2; //Create a sieve of 'half size' starting at 3 BitArray notPrime = new BitArray((bound - 1) >> 1); int limit = ((int)(Math.Sqrt(bound)) - 1) >> 1; for (int i = 0; i < limit; i++) { if (notPrime[i]) continue; //The first number not crossed out is prime int prime = 2 * i + 3; yield return prime; //cross out all multiples of this prime, starting at the prime squared for (int j = (prime * prime - 2) >> 1; j < notPrime.Count; j += prime) { notPrime[j] = true; } } //The remaining numbers not crossed out are also prime for (int i = limit; i < notPrime.Count; i++) { if (!notPrime[i]) yield return 2 * i + 3; } } }