for _ in range(int(input())): N = int(input()) if N % 2 == 0: print("ABAC" * (N // 2) + "BC" * (N // 2)) else: print("ABAC" * (N // 2) + "ABC" + "BC" * (N // 2))