#!/bin/python import sys import math def calc_amount_of_primes1(n): if n == 1: return 0 if n == 2: return 1 diff = n / math.log(n) - int(n / math.log(n)) if diff > 0.5: return int(n / math.log(n)) + 1 else: return int(n / math.log(n)) def is_prime(n): for i in range(2, int(math.sqrt(n)) + 1): if not n % i: return False return True def calc_amount_of_primes(n): if n == 1: return 0 if n == 2: return 1 nums = 1 els = [a for a in range(3, n + 1) if a % 2] for number in els: if is_prime(nums): nums += 1 return nums g = int(raw_input().strip()) for a0 in xrange(g): n = int(raw_input().strip()) primes_count = calc_amount_of_primes(n) if primes_count % 2: print 'Alice' else: print 'Bob'