#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; const constexpr ll INF = 1LL<<55; constexpr int MAX = 1505; vector dp(MAX, vll(MAX, 1)); int main() { rep(i, 0, MAX) { rep(j, 0, MAX) { if(i == 0 || j == 0) dp[i][j] = 1; else { dp[i][j] = dp[i - 1][j] + dp[i][j - 1]; if(dp[i][j] > INF) dp[i][j] = INF; } } } int q; cin >> q; rep(i, 0, q) { int d, x, t; cin >> d >> x >> t; P(dp[d - 1][x] <= t ? "AC" : "ZETUBOU"); } return 0; }