/** * Do u know common thing between me and Java...we both are awesome !!! */ import java.io.*; import java.util.*; class TEST { public static InputStream inputStream = System.in; public static OutputStream outputStream = System.out; public static InputReader in = new InputReader( inputStream ); public static PrintWriter out = new PrintWriter( System.out ); static class Solution { private static final int MAXN = 100007; public static int smallestPrime[] = new int[ MAXN ]; public static void primeFactors() { for ( int i = 2 ; i < MAXN ; i += 2 ) { smallestPrime[ i ] = 2; } for ( int i = 3 ; i < MAXN ; i += 2 ) { if ( smallestPrime[ i ] == 0 ) { smallestPrime[ i ] = i; for ( int j = i ; i * ( long ) j < MAXN ; j += 2 ) { smallestPrime[ i * j ] = i; } } } smallestPrime[1]=1; for ( int i = 2 ; i < MAXN ; i++ ) { if(smallestPrime[i] == i){ smallestPrime[i] = smallestPrime[i-1]+1; } else smallestPrime[i] = smallestPrime[i-1]; } } Solution() { int T; T=in.nextInt(); primeFactors(); while ( T-- >0){ int N = in.nextInt(); if ( smallestPrime[N] %2 ==1){ out.println("Bob"); } else out.println("Alice"); } } } public static void main( String[] atgs ) { new Solution( ); out.close( ); System.exit( 0 ); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader( InputStream stream ) { reader = new BufferedReader( new InputStreamReader( stream ), 32768 ); tokenizer = null; } public String next() { while ( tokenizer == null || !tokenizer.hasMoreTokens( ) ) { try { tokenizer = new StringTokenizer( reader.readLine( ) ); } catch ( IOException e ) { throw new RuntimeException( e ); } } return tokenizer.nextToken( ); } public int nextInt() { return Integer.parseInt( next( ) ); } } }