#include using namespace std; int main() { unsigned long long q, *d, *x, *t, i, j, a; cin >> q; d = new unsigned long long[q]; x = new unsigned long long[q]; t = new unsigned long long[q]; for (i = 0; i < q; i++)cin >> d[i] >> x[i] >> t[i]; for (i = 0; i < q; i++) { a = 1; for (j = 1; j < d[i]; j++)a = a*(x[i] + j) / j; if (a > t[i])cout << "ZETUBOU" << endl; else cout << "AC" << endl; } delete[] t; delete[] x; delete[] d; return 0; }