#include #include #define ll long long int using namespace std; const ll bound = 1e15 + 1; ll dp[1501][1501]; int main(int argc, char const* argv[]) { int q; cin >> q; dp[0][0] = 1; for(int i = 0; i < 1500; i++){ dp[i + 1][0] = 1; for(int j = 1; j <= 1500; j++){ dp[i + 1][j] = min(dp[i + 1][j - 1] + dp[i][j], bound); } } for(int i = 0; i < q; i++){ int d, x; ll t; cin >> d >> x >> t; if(t >= dp[d][x]){ cout << "AC" << endl; }else{ cout << "ZETUBOU" << endl; } } return 0; }