T = int(input()) for _ in range(T): N = int(input()) ans = ["A", "B", "A", "C"] + ["ABC" for _ in range(N - 2)] + ["B", "C"] print("".join(ans))