#include #include const long long INF = 1e15 + 1; long long combination(int n, int r) { r = std::min(r, n - r); long long val = 1; for (int i = 1; i <= r; i++) { val *= n + 1 - i; val /= i; if (val >= INF) { return INF; } } return val; } int main() { int query_num; std::cin >> query_num; for (int i = 0; i < query_num; i++) { long long loop, value, limit; std::cin >> loop >> value >> limit; loop--; if (combination(loop + value, value) > limit) { std::cout << "ZETUBOU" << std::endl; } else { std::cout << "AC" << std::endl; } } return 0; }