#include #include #include #include #include #include #include #include #include #include using namespace std; #define __int64 long long #define long __int64 #define REP(i,a,b) for(int i=a;i> q; rep(i,q){ cin >> d >> x >> t; d --; //(d + x - 1)! <= d! * (x-1)! * t : ok maxd = max(d,x); //maxの方を無効化 int j; tester = 1; for(j = d + x; j>maxd; j--){ tester *= j; tester = tester / (j - maxd) + 0.9999; if(tester > t){ break; } } if(j == maxd){ cout << "AC" << endl; }else{ cout << "ZETUBOU" << endl; } } return 0; }