#include using namespace std; #define int long long #define rep(i,l,r) for(int i=(int)(l);i<(int)(r);i++) #define all(x) (x).begin(),(x).end() #define pb push_back templatebool chmax(T &a,T b){if(abool chmin(T &a,T b){if(a>b){a=b;return 1;}return 0;} typedef pair pii; typedef vector vi; typedef vector vvi; const int inf = 1LL<<60; const int mod = 1e9 + 7; const double eps = 1e-9; /*{ }*/ template class Combination { public: int n; vector fac, finv; Combination(int n_) : n(n_), fac(n_), finv(n_) { fac[0] = 1; for(int i = 1; i < n; i++) fac[i] = fac[i-1]*i%M; finv[n-1] = pow(fac[n-1], M-2); for(int i = n-1; i > 0; i--) finv[i-1] = finv[i]*i%M; } int pow(int a, int b) { if(b == 0) return 1; return pow(a*a%M, b/2)*(b%2?a:1)%M; } int C(int a, int b) { if(b < 0 or a < b) return 0; return fac[a]*finv[a-b]%M*finv[b]%M; } int P(int a, int b) { if(b < 0 or a < b) return 0; return fac[a]*finv[a-b]%M; } int H(int a, int b){ if(a == 0 and b == 0) return 1; return C(a+b-1, b); } }; signed main() { Combination comb(10000); int Q; cin >> Q; while(Q--){ int d, x, t; cin >> d >> x >> t; if(comb.H(d, x) <= t) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }