q = int(input()) for _ in [0] * q: d, x, t = [int(i) for i in input().split()] s = 1 for d in range(d - 1): s = s * (x + 1 + d) // (d + 1) if s > t: break print("AC" if s <= t else "ZETUBOU")