N = int(input()) for _ in range(N) : n = int(input()) print("ABC" * (n - 2) + "ABACBC")