#include using namespace std; typedef long long LL; int main(){ int Q; cin >> Q; for(int q = 0; q < Q; q++){ LL d, x, t; cin >> d >> x >> t; LL v = 1; bool flag = false; for(int i = 0; i < d-1; i++){ v *= x + i + 1; LL f = i + 1; v /= f; if(v > t){ flag = true; break; } } //cerr << v << ", " << t << endl; if(flag){ cout << "ZETUBOU" << endl; }else{ cout << "AC" << endl; } } return 0; }