#!/bin/python import sys g = int(raw_input().strip()) for a0 in xrange(g): n = int(raw_input().strip()) if n==1: print "Bob" elif n==2: print "Alice" else: primescount=len([x for x in range(2,n+1) if all((x%y for y in range(2,1+int(x**0.5))))]) #len of list of prime numbers if primescount%2: #primes count is odd - Alice wins print "Alice" else: #primes count is even Bob wins print "Bob"