#include #define MAX 1500 #define TLE 1000000000000001 using namespace std; typedef long long ll; ll Q, N; ll a[MAX + 10][MAX + 10] = {{0}}; ll nCr(ll n, ll r){ for(int i = 0; i <= MAX; i++){ for(int j = 0; j <= i; j++){ if(j == 0) a[i][j] = 1; else a[i][j] = (a[i - 1][j] + a[i - 1][j - 1]); } } if(a[n][r] >= TLE) return TLE; else return a[n][r]; } int main(void){ cin >> Q; for(int i = 0; i < Q; ++i){ ll D, X, T; cin >> D >> X >> T; ll ans = nCr(X + D - 1, X); if(ans <= T) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }