#include using namespace std; typedef long long ll; int main() { int Q; cin >> Q; for (int i = 0; i < Q; i++) { ll D, X, T; ll k = 1; cin >> D >> X >> T; for (ll j = 1; j < D; j++) { k = (k * (X + j)) / j; if (k > T) break; } if (k <= T) { cout << "AC\n"; } else { cout << "ZETUBOU\n"; } } return 0; }