using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static List prime = new List() { 3 }; static void Main(String[] args) { int g = Convert.ToInt32(Console.ReadLine()); for (int a0 = 0; a0 < g; a0++) { int n = Convert.ToInt32(Console.ReadLine()); FindWinner(n); } } static void FindWinner(int n) { if (n == 1) { Console.WriteLine("Bob"); return; } if (n == 2) { Console.WriteLine("Alice"); return; } if (n > prime.Last()) FindPrimes(n); int primeCount = (from p in prime where p <= n select p).ToList().Count(); if (((primeCount + 1) % 2) == 0) Console.WriteLine("Bob"); else Console.WriteLine("Alice"); } static void FindPrimes(int n) { for (int i = prime.Last(); i <= n; i += 2) { bool p = false; foreach (int num in prime) { if ((i % num) == 0) { p = true; break; } } if (!p) prime.Add(i); } } }