#!/bin/python import sys def primes(limit): limitn = limit+1 not_prime = [False] * limitn primes = [] for i in range(2, limitn): if not_prime[i]: continue for f in xrange(i*2, limitn, i): not_prime[f] = True primes.append(i) return primes g = int(raw_input().strip()) for a0 in xrange(g): n = int(raw_input().strip()) # your code goes here if n == 1: print 'Bob' continue if n == 2: print 'Alice' continue x = primes(n) #print x #print len(x) if len(x) % 2 == 0: print 'Bob' else: print 'Alice'