#include using namespace std; const string msg[] = { "ZETUBOU", "AC" }; signed main(){ int Q; cin >> Q; for( int kase = 0; kase < Q; ++kase ){ int D, X; long long T; cin >> D >> X >> T; long double f = 0; int a = D + X - 1; int b = max( X, D - 1 ); int c = min( X, D - 1 ); for( int i = b + 1; i <= a; ++i ) f += log10( i ); for( int i = 2; i <= c; ++i ) f -= log10( i ); cout << msg[ f - 1e-15 <= log10( ( long double ) T ) ] << endl; } return 0; }