for _ in range(int(input())): N = int(input()) a = 'ABACBC' b = 'ABACABCBC' if N % 2 == 0: ans = a * N else: ans = a * (N - 3) + b print(ans)