def all_two(x): while x % 2 == 0: x //= 2 return x == 1 t = int(input()) for _ in range(t): n, s = input().split() n = int(n) if n == 1: if s == "Odd": print("Alice") else: print("Bob") continue if n & 1: print("Alice") else: if all_two(n): if (n // 2) % 2 == 0 and s == "Even" or (n // 2) % 2 == 1 and s == "Odd": print("Alice") else: print("Bob") else: print("Bob")