#include #define TLE 1000000000000001 using namespace std; typedef long long ll; ll Q; int main(void){ cin >> Q; for(int i = 0; i < Q; ++i){ ll D, X, T; cin >> D >> X >> T; ll ans = 0, m = 1, d = 1; ll n = X + D - 1, r = X; for(int x = 0; x < X; ++x){ m *= (n - x), d *= (r - x); ans = m / d; if(ans >= TLE) break; } if(ans <= T) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }