#include #include #include #include using namespace std; typedef long long ll; const int MAX = 5000; const ll MOD = 1LL << 50; ll c[MAX][MAX]; int main(){ cin.tie(0); ios::sync_with_stdio(false); c[0][0] = 1; for(int i = 1; i < MAX; i++) { for(int j = 0; j < MAX; j++) { if(j == 0 || i == j) { c[i][j] = 1; } else { c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD; } } } ll q; cin >> q; for(int loop = 0; loop < q; loop++) { ll d, x, t; cin >> d >> x >> t; if(c[x + d - 1][d - 1] <= t) { cout << "AC" << endl; } else { cout << "ZETUBOU" << endl; } } }