#include using namespace std; typedef long long ll; double dp[3333][3333]; int main(void) { int q; scanf("%d", &q); dp[0][0] = 1; for (int i = 0; i < 2222; i++) { for (int j = 0; j < 2222; j++) { if (dp[i][j] >= 1e15) { dp[i][j] = -1; } if (dp[i][j] < 0) { dp[i+1][j] = dp[i+1][j+1] = -1; } else { dp[i+1][j] += dp[i][j]; dp[i+1][j+1] += dp[i][j]; } } } for (int iii = 0; iii < q; iii++) { int d, x; ll t; scanf("%d%d%lld", &d, &x, &t); double s = dp[d+x-1][x]; puts((s<0||s>t) ? "ZETUBOU" : "AC"); } return 0; }