#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pi; typedef pair pl; typedef pair pls; int D[10001]; int X[10001]; ll T[10001]; int main() { int Q; cin>> Q; for (int i = 0; i < Q; i++) { cin >> D[i] >> X[i] >> T[i]; } for (int i = 0; i < Q; i++) { ll n = D[i] - 1; if (n == 0) { if (n <= T[i]) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } else if (n == 1) { if (X[i] + 1 <= T[i]) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } else { n = (X[i] + 1)*(X[i] + 2) / 2; if (n <= T[i]) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } } return 0; }