N = 3000 Q = int(raw_input()) dp = [1] + range(1,N) for i in xrange(1,N): dp[i] *= dp[i-1] for i in xrange(Q): D,X,T = map(int,raw_input().split(" ")) print "AC" if dp[X+D-1]/dp[X]/dp[D-1] <= T else "ZETUBOU"