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