def judge(X, D, T): C = 1 for i in xrange(1, D): C = C * (X + i) / i if C > T: return False return True Q = int(raw_input()) for loop in xrange(Q): D, X, T = map(int, raw_input().split()) print "AC" if judge(X, D, T) else "ZETUBOU"