#include using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; #define P(x) cout << (x) << endl #define p(x) cout << (x) #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define rep(i,a,n) for(int i=(a), i##_len=(n); in; --i) #define len(x) ((int)(x).size()) #define mp make_pair #define eb emplace_back typedef long long ll; typedef vector vi; typedef vector vd; typedef vector vll; typedef vector vs; typedef vector vb; constexpr ll MAX_T = 1e15 + 10; ll c(ll n, ll r) { ll res = 1; rrep(i, r - 1, -1) { res = res * (n - i) / (r - i); if (res >= MAX_T) return MAX_T; } return res; } int main() { int q; cin >> q; rep(i, 0, q) { ll d, x, t; cin >> d >> x >> t; P(c(x + d - 1, d - 1) <= t ? "AC" : "ZETUBOU"); } return 0; }