def Prime(n): p = 2 q = 0 ans = [] while p <= n**0.5: while n % p == 0: n //= p q += 1 if q == 0: p += 1 continue ans.append([p,q]) p += 1 if n > 1: ans.append([n,1]) return ans N = int(input()) M = list(map(int,input().split())) G = [] print(Prime(4)) for i in range(N): m = M[i] pm = Prime(m) g = 0 for p,q in pm: q %= 3 g ^= q G.append(g) ans = 0 for g in G: ans ^= g if ans != 0: print('Alice') else: print('Bob')