import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { List numbers; private boolean isPrime(int x) { if (x == 2) { return true; } if (x%2 == 0) { return false; } for (int i=3; i*i<=x; i+=2) { if (x%i == 0) { return false; } } return true; } private int noMoreTurns(int turn) { while (!numbers.isEmpty()) { numbers.remove(0); if (turn == 1) { turn = 2; } else { turn = 1; } } return turn; } public static void main(String[] args) { Scanner in = new Scanner(System.in); Solution obj = new Solution(); int g = in.nextInt(); for(int a0 = 0; a0 < g; a0++){ int n = in.nextInt(); // your code goes here obj.numbers = new ArrayList(); for (int i=2; i<=n; i++) { if (obj.isPrime(i)) { obj.numbers.add(i); } } int loser = obj.noMoreTurns(1); if (loser == 1) { System.out.println("Bob"); } else { System.out.println("Alice"); } } } }