#include #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) #define itall(a) a.begin(), a.end() using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; const double pi = acos(-1); const double eps = 1e-8; template inline T sq(T a) { return a * a; } template inline T cb(T a) { return a * a * a; } template inline bool umin(T &a, const T &b) { return b < a && (a = b, true); } template inline bool umax(T &a, const T &b) { return a < b && (a = b, true); } ll infl = 1e15 + 10; ll comb(ll a, ll b) { ll res = 1; repr (i, b) { res *= a - i; res /= b - i; if (res >= infl) return infl; } return res; } int main() { int Q; cin >> Q; rep (i, Q) { ll D, X, T; cin >> D >> X >> T; if (comb(D + X - 1, D - 1) <= T) { cout << "AC" << endl; } else { cout << "ZETUBOU" << endl; } } }