#include using Int = int64_t; void Solve() { Int n; std::cin >> n; std::string s; std::cin >> s; if (s == "Odd") { bool wins = n & 1; if (n == 2) { wins = !wins; } std::cout << (wins ? "Alice\n" : "Bob\n"); } else { assert(s == "Even"); bool wins = n & 1; if (std::__has_single_bit(n) && n != 2) { wins = !wins; } std::cout << (wins ? "Alice\n" : "Bob\n"); } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); Int t; std::cin >> t; while (t--) { Solve(); } }