#include #include template std::vector vec(int len, T elem) { return std::vector(len, elem); } using lint = long long; constexpr int X = 3000; constexpr lint INF = 1LL << 50; std::vector> comb; void init() { comb = vec(X + 1, vec(X + 1, 0LL)); comb[0][0] = 1; for (int x = 1; x <= X; ++x) { for (int y = 0; y <= x; ++y) { comb[x][y] = (y > 0 ? comb[x - 1][y - 1] : 0) + (y < x ? comb[x - 1][y] : 0); comb[x][y] = std::min(comb[x][y], INF); } } } void solve() { int d, x; lint t; std::cin >> d >> x >> t; std::cout << (comb[x + d - 1][d - 1] <= t ? "AC" : "ZETUBOU") << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); init(); int q; std::cin >> q; while (q--) solve(); return 0; }