#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } typedef unsigned long long ull; typedef long long ll; typedef pair pii; typedef pair pll; typedef pair P; const ll INF = 1ll<<29; const ll MOD = 1000000007; const double EPS = 1e-10; ll ncr[1501][1501]; void nCr(ll n, ll r) { REP(i, n + 1) { REP(j, i + 1) { if (j == 0 || j == i) ncr[i][j] = 1; else { ncr[i][j] = ncr[i - 1][j - 1] + ncr[i - 1][j]; chmin(ncr[i][j], 1ll<<61); } } } } ll nhr(ll n, ll r) { return ncr[n + r - 1][r]; } int main() { nCr(1500, 1500); int q; cin >> q; REP(i, q) { ll d, x, t; scanf("%lld %lld %lld", &d, &x, &t); puts(nhr(d, x) <= t ? "AC" : "ZETUBOU"); } return 0; }