import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int g = in.nextInt(); SortedMap primeCountMap = new TreeMap<>(); primeCountMap.put(2, 1); for (int a0 = 0; a0 < g; a0++) { int n = in.nextInt(); // your code goes here int primeCount = 0; int index = 0; if (n <= primeCountMap.lastKey()) { for (Integer key : primeCountMap.keySet()) { if (key == n) { primeCount = primeCountMap.get(key); index = n + 1; break; } else if (key > n) { primeCount = primeCountMap.get(key) - 1; index = n + 1; break; } } } else { index = primeCountMap.lastKey() + 1; primeCount = primeCountMap.get(primeCountMap.lastKey()); } for (; index <= n; index++) { if (isPrime(index)) { primeCount++; primeCountMap.put(index, primeCount); } } if (primeCount % 2 == 1) { System.out.println("Alice"); } else { System.out.println("Bob"); } } } private static boolean isPrime(int i) { for (int j = 2; j <= Math.sqrt(i); j++) { if (i % j == 0) { return false; } } return true; } }