T = int(input()) for t in range(T): n, s = input().split() n = int(n) if n in [1, 2]: print("Alice" if s == "Odd" else "Bob") elif n == 4: print("Bob" if s == "Odd" else "Alice") else: print("Alice")