#include #include using namespace std; const int LIM = 1000000000; int dp[1501][1501]; int solve(int X, int D){ if(D == 1)return 1; if(dp[X][D] != -1)return dp[X][D]; int res = solve(X, D - 1); if(X > 0){ res += solve(X - 1, D); } if(res > LIM){ res = LIM + 1; } return dp[X][D] = res; } int main(){ memset(dp, -1, sizeof(dp)); int Q; cin >> Q; for(int q=0;q> D >> X >> T; if(solve(X, D) <= T){ cout << "AC" << endl; } else { cout << "ZETUBOU" << endl; } } return 0; }