#include #include #include #include #include #include #include #include #include #include #include #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; int inputValue(){ int a; cin >> a; return a; }; template void output(T a, int precision) { if(precision > 0){ cout << setprecision(precision) << a << "\n"; } else{ cout << a << "\n"; } } bool comb(ll a, ll b){ ll c = min(b, a - b); ll ret = 1; repd(i, 1, c){ ret *= a - i + 1; ret /= i; if (ret > 1e15) { return false; } } return true; } ll combi(ll a, ll b){ ll c = min(b, a - b); ll ret = 1; repd(i, 1, c + 1){ ret *= a - i + 1; ret /= i; if (ret > 1e15) { return -1; } } return ret; } int main() { // source code int N = inputValue(); rep(i, N){ ll D, X, T; cin >> D >> X >> T; // X+D-1_C_D-1 // output(combi(X + D - 1, D - 1), 0); ll c = combi(X + D - 1, D - 1); if (c <= T && c != -1) { output("AC", 0); } else{ output("ZETUBOU", 0); } } return 0; }