// yukicoder: No.250 atetubouのzetubou // 2019.7.15 bal4u #include typedef long long ll; #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { // 非負整数の入力 int n = 0; int c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } ll In() { // 非負整数の入力 ll n = 0; int c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } void outs(char *s) { while (*s) pc(*s++); pc('\n'); } int main() { int i, Q, D, X; ll T, ans; Q = in(); while (Q--) { D = in(), X = in(), T = In(), ans = 1; for (i = 1; i < D; i++) { if ((ans = ans*(X+i)/i) > T) break; } outs(ans <= T? "AC": "ZETUBOU"); } return 0; }