#include #include #include #include using namespace std; typedef long long ll; const int MAX = 5000; const ll MOD = ll(1e9 + 7); ll c[MAX][MAX]; int main(){ cin.tie(0); ios::sync_with_stdio(false); for(int i = 0; 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; } } }