T = int(input()) for _ in range(T): N = int(input()) ans = ["ABAC"] for _ in range(N-2): ans.append("ABC") ans.append("BC") print("".join(ans))