#include #include #include #include using namespace std; typedef long long ll; const int SIZE = 5000; const ll MAX = ll(1e15); ll c[SIZE][SIZE]; int main(){ cin.tie(0); ios::sync_with_stdio(false); c[0][0] = 1; for(int i = 1; i < SIZE; i++) { for(int j = 0; j <= i; j++) { if(j == 0 || i == j) { c[i][j] = 1; } else if(c[i - 1][j - 1] == -1 || c[i - 1][j] == -1) { c[i][j] = -1; } else { c[i][j] = c[i - 1][j - 1] + c[i - 1][j]; if(c[i][j] >= MAX) c[i][j] = -1; } } } ll q; cin >> q; for(int loop = 0; loop < q; loop++) { ll d, x, t; cin >> d >> x >> t; if(c[x + d - 1][d - 1] <= t) { cout << "AC" << endl; } else { cout << "ZETUBOU" << endl; } } }