#include using namespace std; typedef long long ll; int main(){ int q; cin >> q; ll d,x,t,times; while(q-- > 0){ cin >> d >> x >> t; times = 1; if(d != 1){ d--; if(d > x) swap(d,x); ll top = x+d; ll bottom = d; for(ll i = 1; i <= bottom; i++){ times *= (top-- / i); if(times > 1e15){ times = t+1; break; } } } if(times <= t) cout << "AC" << endl; else cout << "ZETUBOU" << endl; } return 0; }