N = 3000 Q = int(raw_input()) dp = [1 for i in xrange(N)] for i in xrange(2,N): dp[i] = 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"